Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --nightc0reee!!!!
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Script0 = Instance.new("Script")
- LocalScript1 = Instance.new("LocalScript")
- Script0.Name = "Rave Generator by The_Spaz"
- Script0.Parent = mas
- table.insert(cors,sandbox(Script0,function()
- --Rave Generator by The_Spaz
- --Put the ID numbers for the songs you want inside these brackets, separated by commas.
- playlist = {604107437, 1071349195, 191596930, 231975895, 434153041, 513188679, 595081706, 706271527, 335096848, 447791992, 376365911, 934433777, 320175731, 531005333, 261892438, 358192891, 1108902241, 240901998, 600762973, 655543233, 364259267, 367822383, 227076762, 235898738, 245494183, 535679604, 232948011, 1025487311, 234322073, 680967378, 242890601, 252122769, 227066047, 178006788, 198322245, 1110549315, 302113168, 1067715997, 226712751, 515965838, 469023238, 182549981, 252131405, 225386578, 645647813, 394386965, 691435421, 333185797, 231012360, 591967140, 302981426, 192917474, 1114814959}
- --If this is set to true, the order of the songs will be randomized.
- shuffle = true
- --Don't edit anything under this line (unless you know what you're doing).
- math.randomseed(tick())
- song = 0
- gui = Instance.new("ScreenGui", game.StarterGui)
- gui.Name = "RaveGui"
- label = Instance.new("TextLabel", gui)
- label.Size = UDim2.new(1, 0, 0.075, 0)
- label.Position = UDim2.new(0, 0, 0.85, 0)
- label.BackgroundTransparency = 1
- label.TextStrokeColor3 = Color3.new(1, 1, 1)
- label.TextStrokeTransparency = 0
- label.Font = Enum.Font.SciFi
- label.TextScaled = true
- label.Text = "Now Playing: none"
- for _, player in pairs(game.Players:GetChildren()) do
- gui:Clone().Parent = player:WaitForChild("PlayerGui")
- script.LocalRave:Clone().Parent = player.Character
- end
- script.LocalRave.Parent = game.StarterPlayer.StarterCharacterScripts
- function nextSong()
- song = #playlist > 1 and (shuffle and (song + math.random(1, #playlist - 2)) % #playlist + 1 or (song + 1) % #playlist + 1) or 1
- local info = game:service("MarketplaceService"):GetProductInfo(playlist[song])
- label.Text = "Now Playing : " .. info.Name
- local skip = false
- local sound = Instance.new("Sound", workspace)
- sound.SoundId = "rbxassetid://" .. playlist[song]
- sound.Volume = 0
- sound.Loaded:connect(function()
- sound:Play()
- wait()
- while sound.TimePosition > 0 and wait() do
- if sound.TimePosition > sound.TimeLength - 10 and sound.Volume > 0 then
- if not skip then
- skip = true
- nextSong()
- end
- sound.Volume = sound.Volume - 0.005
- else
- if sound.TimePosition < 10 and sound.Volume < 1 then
- sound.Volume = sound.Volume + 0.005
- end
- end
- end
- wait(0.5)
- sound:Destroy()
- end)
- end
- if #playlist > 0 then
- nextSong()
- end
- end))
- LocalScript1.Name = "LocalRave"
- LocalScript1.Parent = Script0
- table.insert(cors,sandbox(LocalScript1,function()
- --You don't need to edit this script
- math.randomseed(tick())
- h = math.random(0, 100)
- lastbeat = 0
- lastloudness = 0
- color = Color3.fromHSV(h / 100, 1, 0.9)
- blur = 0
- workspace.CurrentCamera:ClearAllChildren()
- colorEffect = Instance.new("ColorCorrectionEffect", workspace.CurrentCamera)
- colorEffect.TintColor = color
- blurEffect = Instance.new("BlurEffect", workspace.CurrentCamera)
- blurEffect.Size = blur
- game:service("RunService"):BindToRenderStep("rave", 0, function()
- local sound = workspace:FindFirstChildOfClass("Sound")
- if sound then
- local beat = math.abs(sound.PlaybackLoudness - lastloudness)
- if beat > lastbeat then
- lastbeat = beat
- else
- lastbeat = lastbeat - 10
- if lastbeat < 0 then
- lastbeat = 0
- end
- end
- h = (h + beat / 250) % 100
- lastloudness = sound.PlaybackLoudness
- color = Color3.fromHSV(h / 100, 1, 0.99 + lastbeat / 1000)
- blur = lastloudness / 50
- if game.Players.LocalPlayer.PlayerGui:FindFirstChild("RaveGui") then
- game.Players.LocalPlayer.PlayerGui.RaveGui.TextLabel.Text = game.StarterGui.RaveGui.TextLabel.Text
- game.Players.LocalPlayer.PlayerGui.RaveGui.TextLabel.TextColor3 = Color3.fromHSV(h / 100, 1, 0.5)
- end
- colorEffect.TintColor = color
- blurEffect.Size = blur
- lastloudness = sound.PlaybackLoudness
- end
- end)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = script
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement