Advertisement
ReisenBunny

Pizza time

Sep 8th, 2018
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. local Player = game:GetService("Players").MrLoLy --<=== Replace With Your Name
  2.  
  3.  
  4. local Mouse,mouse,UserInputService,ContextActionService
  5. do
  6. script.Parent = Player.Character
  7. local CAS = {Actions={}}
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10. Event.Parent = Player.Character
  11. local fakeEvent = function()
  12. local t = {_fakeEvent=true}
  13. t.Connect = function(self,f)self.Function=f end
  14. t.connect = t.Connect
  15. return t
  16. end
  17. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  18. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  19. function CAS:BindAction(name,fun,touch,...)
  20. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  21. end
  22. function CAS:UnbindAction(name)
  23. CAS.Actions[name] = nil
  24. end
  25. local function te(self,ev,...)
  26. local t = m[ev]
  27. if t and t._fakeEvent and t.Function then
  28. t.Function(...)
  29. end
  30. end
  31. m.TrigEvent = te
  32. UIS.TrigEvent = te
  33. Event.OnServerEvent:Connect(function(plr,io)
  34. if plr~=Player then return end
  35. if io.isMouse then
  36. m.Target = io.Target
  37. m.Hit = io.Hit
  38. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  39. if io.UserInputState == Enum.UserInputState.Begin then
  40. m:TrigEvent("Button1Down")
  41. else
  42. m:TrigEvent("Button1Up")
  43. end
  44. else
  45. for n,t in pairs(CAS.Actions) do
  46. for _,k in pairs(t.Keys) do
  47. if k==io.KeyCode then
  48. t.Function(t.Name,io.UserInputState,io)
  49. end
  50. end
  51. end
  52. if io.UserInputState == Enum.UserInputState.Begin then
  53. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  54. UIS:TrigEvent("InputBegan",io,false)
  55. else
  56. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent("InputEnded",io,false)
  58. end
  59. end
  60. end)
  61. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  62. end
  63.  
  64. -- edited to be FE by Momiji
  65. s=Instance.new'Sound';
  66. s.Parent=workspace;
  67. s.SoundId='rbxassetid://152840862';
  68. s.Pitch=1;
  69. s.Volume=1;
  70. s.Looped=true;
  71. s:play();
  72. local s = Instance.new("Sound")
  73.  
  74. s.Name = "Sound"
  75. s.SoundId = "http://www.roblox.com/asset/?id=1994323248"
  76. s.Volume = 30
  77. s.Looped = true
  78. s.archivable = false
  79. s.Pitch = 1
  80.  
  81. s.Parent = game.Workspace
  82.  
  83. wait(1)
  84.  
  85. s:play()
  86. for _, v in pairs(game.Lighting:GetChildren()) do if v.ClassName == 'Sky' then v:Destroy() end end
  87. local sky = Instance.new('Sky', game.Lighting)
  88. local params = {'SkyboxBk', 'SkyboxDn', 'SkyboxFt', 'SkyboxLf', 'SkyboxRt', 'SkyboxUp'}
  89. function switchSky(sk)
  90. for _,v in pairs(params) do
  91. sky[v] = sk
  92. end
  93. end
  94. while wait() do
  95. game.Lighting.FogEnd = 0
  96. game.Lighting.FogColor = Color3.new(math.random(), math.random(), math.random())
  97. switchSky('http://www.roblox.com/asset/?id=68351011')
  98. wait()
  99. game.Lighting.FogColor = Color3.new(math.random(), math.random(), math.random())
  100. switchSky('http://www.roblox.com/asset/?id=55054494')
  101. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement