Advertisement
YukkoAioi

ULTIM8 NIGHTCORE PARTY

Oct 27th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.56 KB | None | 0 0
  1.  
  2. --nightc0reee!!!!
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Script0 = Instance.new("Script")
  20. LocalScript1 = Instance.new("LocalScript")
  21. Script0.Name = "Rave Generator by The_Spaz"
  22. Script0.Parent = mas
  23. table.insert(cors,sandbox(Script0,function()
  24. --Rave Generator by The_Spaz
  25.  
  26. --Put the ID numbers for the songs you want inside these brackets, separated by commas.
  27. 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}
  28.  
  29. --If this is set to true, the order of the songs will be randomized.
  30. shuffle = true
  31.  
  32. --Don't edit anything under this line (unless you know what you're doing).
  33.  
  34. math.randomseed(tick())
  35.  
  36. song = 0
  37.  
  38. gui = Instance.new("ScreenGui", game.StarterGui)
  39. gui.Name = "RaveGui"
  40. label = Instance.new("TextLabel", gui)
  41. label.Size = UDim2.new(1, 0, 0.075, 0)
  42. label.Position = UDim2.new(0, 0, 0.85, 0)
  43. label.BackgroundTransparency = 1
  44. label.TextStrokeColor3 = Color3.new(1, 1, 1)
  45. label.TextStrokeTransparency = 0
  46. label.Font = Enum.Font.SciFi
  47. label.TextScaled = true
  48. label.Text = "Now Playing: none"
  49.  
  50. for _, player in pairs(game.Players:GetChildren()) do
  51. gui:Clone().Parent = player:WaitForChild("PlayerGui")
  52. script.LocalRave:Clone().Parent = player.Character
  53. end
  54.  
  55. script.LocalRave.Parent = game.StarterPlayer.StarterCharacterScripts
  56.  
  57. function nextSong()
  58. song = #playlist > 1 and (shuffle and (song + math.random(1, #playlist - 2)) % #playlist + 1 or (song + 1) % #playlist + 1) or 1
  59. local info = game:service("MarketplaceService"):GetProductInfo(playlist[song])
  60. label.Text = "Now Playing : " .. info.Name
  61. local skip = false
  62. local sound = Instance.new("Sound", workspace)
  63. sound.SoundId = "rbxassetid://" .. playlist[song]
  64. sound.Volume = 0
  65. sound.Loaded:connect(function()
  66. sound:Play()
  67. wait()
  68. while sound.TimePosition > 0 and wait() do
  69. if sound.TimePosition > sound.TimeLength - 10 and sound.Volume > 0 then
  70. if not skip then
  71. skip = true
  72. nextSong()
  73. end
  74. sound.Volume = sound.Volume - 0.005
  75. else
  76. if sound.TimePosition < 10 and sound.Volume < 1 then
  77. sound.Volume = sound.Volume + 0.005
  78. end
  79. end
  80. end
  81. wait(0.5)
  82. sound:Destroy()
  83. end)
  84. end
  85.  
  86. if #playlist > 0 then
  87. nextSong()
  88. end
  89. end))
  90. LocalScript1.Name = "LocalRave"
  91. LocalScript1.Parent = Script0
  92. table.insert(cors,sandbox(LocalScript1,function()
  93. --You don't need to edit this script
  94.  
  95. math.randomseed(tick())
  96.  
  97. h = math.random(0, 100)
  98. lastbeat = 0
  99. lastloudness = 0
  100. color = Color3.fromHSV(h / 100, 1, 0.9)
  101. blur = 0
  102. workspace.CurrentCamera:ClearAllChildren()
  103. colorEffect = Instance.new("ColorCorrectionEffect", workspace.CurrentCamera)
  104. colorEffect.TintColor = color
  105. blurEffect = Instance.new("BlurEffect", workspace.CurrentCamera)
  106. blurEffect.Size = blur
  107.  
  108. game:service("RunService"):BindToRenderStep("rave", 0, function()
  109. local sound = workspace:FindFirstChildOfClass("Sound")
  110. if sound then
  111. local beat = math.abs(sound.PlaybackLoudness - lastloudness)
  112. if beat > lastbeat then
  113. lastbeat = beat
  114. else
  115. lastbeat = lastbeat - 10
  116. if lastbeat < 0 then
  117. lastbeat = 0
  118. end
  119. end
  120. h = (h + beat / 250) % 100
  121. lastloudness = sound.PlaybackLoudness
  122. color = Color3.fromHSV(h / 100, 1, 0.99 + lastbeat / 1000)
  123. blur = lastloudness / 50
  124. if game.Players.LocalPlayer.PlayerGui:FindFirstChild("RaveGui") then
  125. game.Players.LocalPlayer.PlayerGui.RaveGui.TextLabel.Text = game.StarterGui.RaveGui.TextLabel.Text
  126. game.Players.LocalPlayer.PlayerGui.RaveGui.TextLabel.TextColor3 = Color3.fromHSV(h / 100, 1, 0.5)
  127. end
  128. colorEffect.TintColor = color
  129. blurEffect.Size = blur
  130. lastloudness = sound.PlaybackLoudness
  131. end
  132. end)
  133. end))
  134. for i,v in pairs(mas:GetChildren()) do
  135. v.Parent = script
  136. pcall(function() v:MakeJoints() end)
  137. end
  138. mas:Destroy()
  139. for i,v in pairs(cors) do
  140. spawn(function()
  141. pcall(v)
  142. end)
  143. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement