Advertisement
ItzInfern

rainbow path way

Jan 4th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.27 KB | None | 0 0
  1.  
  2.  
  3. --https://github.com/Mokiros/roblox-FE-compatibility
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. local RealPlayer = Player
  7. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  8.  
  9.  
  10. Colors = {"Really black", "Navy blue", "Really red", "Bright bluish green", "New Yeller", "Royal purple", "Deep orange", "Magenta", "Lime green"}
  11. Player = game:GetService("Players").LocalPlayer
  12. Char = Player.Character
  13. Torso = Char.Torso
  14. Mouse = Player:GetMouse()
  15.  
  16. pcall(function()Char.Platform:Destroy() end)
  17. Main = Instance.new("Model",Char)
  18. Main.Name = "Platform"
  19. script.Parent = Main
  20. Mode = 10
  21. Mode2 = 0
  22. With = 5 -- Must be 5 and larger. Idk why.
  23. Highth = .5
  24. OnColor = 1
  25.  
  26. MainP = Instance.new("Part",Main)
  27. MainP.FormFactor = "Custom"
  28. MainP.Size = Vector3.new(With,Highth,With)
  29. MainP.BrickColor = BrickColor.new(Colors[OnColor])
  30. MainP.Anchored = true
  31. MainP:BreakJoints()
  32. Instance.new("CylinderMesh",MainP)
  33.  
  34. game:GetService("RunService").Stepped:connect(function()
  35. if Mode == 1 then
  36. if Mode2 == 1 then
  37. Torso.CFrame = Torso.CFrame*CFrame.new(0,-.5,0)
  38. elseif Mode2 == 2 then
  39. Torso.CFrame = Torso.CFrame*CFrame.new(0,.5,0)
  40. end
  41. MainP.CFrame = Torso.CFrame * CFrame.new(0,-3+-.225,0)
  42. elseif Mode == 2 then
  43. MainP.CFrame = Torso.CFrame * CFrame.new(5,5,5)
  44. else
  45. Mode = 1
  46. MainP.CFrame = Torso.CFrame * CFrame.new(0,-3+-.225,0)
  47. end
  48. end)
  49.  
  50. LastPart = MainP
  51. Num = 4
  52. game:GetService("RunService").Stepped:connect(function()
  53. local a = OnColor+1
  54. if #Colors < a then
  55. OnColor = 1
  56. else
  57. OnColor = OnColor+1
  58. end
  59. a = MainP:Clone()
  60. a.Mesh.Scale = Vector3.new(.8,.8,.8)
  61. a.Parent = MainP.Parent
  62. a.BrickColor = BrickColor.new(Colors[OnColor])
  63. a.CanCollide = false
  64. aPOS = a.CFrame
  65. coroutine.wrap(function()
  66. for i = 0,1,1/15 do wait()
  67. a.Transparency = i
  68. end
  69. a:Destroy()
  70. end)()
  71. coroutine.wrap(function()
  72. for i = .8,0,.8/-15 do wait()
  73. a.Mesh.Scale = Vector3.new(i,i-.05,i)
  74. end
  75. end)()
  76. end)
  77. local BHold = false
  78. Mouse.KeyDown:connect(function(Key)
  79. if Key == "c" and Mode == 1 then
  80. BHold = true
  81. repeat wait() Mode2 = 1 until BHold == false
  82. Mode2 = 0
  83. elseif Key == "z" and Mode == 1 then
  84. BHold = true
  85. repeat wait() Mode2 = 2 until BHold == false
  86. Mode2 = 0
  87. elseif Key == "p" then
  88. if Mode == 1 then
  89. Mode = 2
  90. coroutine.wrap(function()
  91. while Mode == 2 do
  92. wait()
  93. if Char:GetModelCFrame().p.y < -10 then
  94. Mode = 1
  95. end
  96. end
  97. end)()
  98. else
  99. Mode = 1
  100. end
  101. end
  102. end)
  103. Mouse.KeyUp:connect(function(Key)
  104. if Key == "c" or Key == "z" then
  105. BHold = false
  106. end
  107. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement