Hello,
Here are the only two scripts you need to know.
wait(1)
local oldbiome = 0
local function ta(a,b,c,d,e,f,durat,biome)
if biome~=oldbiome then
oldbiome = biome
game:GetService("TweenService"):Create(game.Lighting.Atmosphere,TweenInfo.new(durat,Enum.EasingStyle.Quad),{Density = a, Offset = b, Color = c, Decay = d, Glare = e, Haze = f}):Play()
wait(durat)
game.Lighting.Atmosphere.Density = a
game.Lighting.Atmosphere.Offset = b
game.Lighting.Atmosphere.Color = c
game.Lighting.Atmosphere.Decay = d
game.Lighting.Atmosphere.Glare = e
game.Lighting.Atmosphere.Haze = f
end
end
game:GetService("RunService").RenderStepped:Connect(function()
local e = game.Workspace.biomes:GetChildren()
for i, v in pairs(e) do
if v.Name=="biome" then
if game.Players.LocalPlayer.Character.Head.Position.X>=v.Position.X-v.Size.X/2 then
if game.Players.LocalPlayer.Character.Head.Position.X<=v.Position.X+v.Size.X/2 then
if game.Players.LocalPlayer.Character.Head.Position.Z>=v.Position.Z-v.Size.Z/2 then
if game.Players.LocalPlayer.Character.Head.Position.Z<=v.Position.Z+v.Size.Z/2 then
if v.Position.Y>game.Players.LocalPlayer.Character.Head.Position.Y then
if v.Parent.Parent~=game.Players.LocalPlayer.Character then
if v.Value.Value==0 then
script.Value.Value="Wasteland Edges"
game.Players.LocalPlayer.PlayerGui.ambience.Playing = true
script.id.Value = v.Value.Value
local vol = .5
game.Players.LocalPlayer.PlayerGui.sound.Event:Fire({"rbxassetid://3097850155"},vol)
coroutine.wrap(function()
ta(.1,0,Color3.fromRGB(65, 57, 50),Color3.fromRGB(174, 157, 145),1.05,2.3,1,v.Value.Value)
end)()
end
if v.Value.Value==1 then
script.Value.Value="Sovirus Outskirts"
game.Players.LocalPlayer.PlayerGui.ambience.Playing = true
script.id.Value = v.Value.Value
local vol = .5
game.Players.LocalPlayer.PlayerGui.sound.Event:Fire({"rbxassetid://4172834505"},vol)
coroutine.wrap(function()
ta(.1,0,Color3.fromRGB(65, 57, 50),Color3.fromRGB(174, 157, 145),1.32,2.06,1,v.Value.Value)
end)()
end
if v.Value.Value==2 then
script.Value.Value="Sovirus Farmlands"
game.Players.LocalPlayer.PlayerGui.ambience.Playing = true
script.id.Value = v.Value.Value
local vol = .5
game.Players.LocalPlayer.PlayerGui.sound.Event:Fire({"rbxassetid://931256455","rbxassetid://931254912","rbxassetid://935400460","rbxassetid://931260033"},vol)
ta(.1,0,Color3.fromRGB(175, 207, 255),Color3.fromRGB(225, 215, 198),1.32,2.06,1,v.Value.Value)
end
if v.Value.Value==3 then
script.Value.Value="Sovirus Outer Suburbs"
game.Players.LocalPlayer.PlayerGui.ambience.Playing = true
script.id.Value = v.Value.Value
local vol = .5
game.Players.LocalPlayer.PlayerGui.sound.Event:Fire({"rbxassetid://894818144"},{"rbxassetid://1840684551"},vol)
ta(.1,0,Color3.fromRGB(175, 207, 255),Color3.fromRGB(225, 218, 208),0,0,1,v.Value.Value)
end
if v.Value.Value==4 then
script.Value.Value="Sovirus Suburbs"
game.Players.LocalPlayer.PlayerGui.ambience.Playing = true
script.id.Value = v.Value.Value
local vol = .5
game.Players.LocalPlayer.PlayerGui.sound.Event:Fire({"rbxassetid://3182738096","rbxassetid://6062137050","rbxassetid://6062135904"},vol)
ta(.1,0,Color3.fromRGB(175, 207, 255),Color3.fromRGB(225, 225, 199),0,0,1,v.Value.Value)
end
end
end
end
end
end
end
end
end
end)
Event script:
local r = {}
local new = false
script.Event.Event:Connect(function(s,vol)
new = false
if #r~=#s then
new = true
else
for i=1,#r do
if new==false then
if r[i]==s[i] then
new = false
else
new = true
end
end
end
end
if new==true then
r = s
new = false
repeat
for i = 1,#r do
script.Parent.ambience.SoundId = r[i]
if script.Parent.ambience.IsLoaded==false then
script.Parent.ambience.Loaded:Wait()
end
script.Parent.ambience.Volume = 0
script.Parent.ambience:Play()
print(vol)
game:GetService("TweenService"):Create(script.Parent.ambience,TweenInfo.new(.5,Enum.EasingStyle.Quad),{Volume = vol}):Play()
wait(script.Parent.ambience.TimeLength-.5)
game:GetService("TweenService"):Create(script.Parent.ambience,TweenInfo.new(.5,Enum.EasingStyle.Quad),{Volume = 0}):Play()
end
until new==true
end
end)
So this is supposed to
Here is the script where it is event fire
Hierarchy

Playtest:
Also another problem here is that my wait is off
This is supposed to be waiting the length of the music minus .5 because that’s the time it takes to fade out tween
Also apparently it’s random. Sometimes it just waits 5 seconds then replays and sometimes it waits like 20 seconds then replays (the audio length is actually more than 100 seconds)
Also another thing to note is that it has 4 audios in its playlist so it’s not supposed to loop around to the first one again when not even waiting the first one’s length
Also another thing to note is that when it prints out the volume it shows that it’s a new biome so yeah
This is all very confusing and if I could have some instant help that would be awesome
- Br, iSyriux