Advertisement
therainbowcreeperRBX

fe double boost

Oct 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Double Boost Recreation by Theamazingnater
  2.  
  3. -- This script has been converted to FE by iPxter
  4.  
  5.  
  6. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  7. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  8. do
  9. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  10. script.Parent = Player.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent and t.Function then
  36. t.Function(...)
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=Player then return end
  44. if io.isMouse then
  45. m.Target = io.Target
  46. m.Hit = io.Hit
  47. else
  48. local b = io.UserInputState == Enum.UserInputState.Begin
  49. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  50. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  51. end
  52. for _,t in pairs(CAS.Actions) do
  53. for _,k in pairs(t.Keys) do
  54. if k==io.KeyCode then
  55. t.Function(t.Name,io.UserInputState,io)
  56. end
  57. end
  58. end
  59. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  60. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  61. end
  62. end)
  63. Event.Parent = NLS([==[
  64. local Player = game:GetService("Players").LocalPlayer
  65. local Event = script:WaitForChild("UserInput_Event")
  66.  
  67. local UIS = game:GetService("UserInputService")
  68. local input = function(io,a)
  69. if a then return end
  70. --Since InputObject is a client-side instance, we create and pass table instead
  71. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  72. end
  73. UIS.InputBegan:Connect(input)
  74. UIS.InputEnded:Connect(input)
  75.  
  76. local Mouse = Player:GetMouse()
  77. local h,t
  78. --Give the server mouse data 30 times every second, but only if the values changed
  79. --If player is not moving their mouse, client won't fire events
  80. while wait(1/30) do
  81. if h~=Mouse.Hit or t~=Mouse.Target then
  82. h,t=Mouse.Hit,Mouse.Target
  83. Event:FireServer({isMouse=true,Target=t,Hit=h})
  84. end
  85. end]==],Player.Character)
  86. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  87. end
  88.  
  89. plr = owner
  90. repeat wait() until plr.Character
  91. char = plr.Character
  92.  
  93.  
  94. wait(1)
  95.  
  96. local neck = Instance.new("Weld",char)
  97. neck.Part0 = char.Torso
  98. neck.Part1 = char.Head
  99. neck.C0 = CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  100. local humanroot = Instance.new("Weld",char)
  101. humanroot.Name = "HumanoidRoot"
  102. humanroot.Part0 = char.HumanoidRootPart
  103. humanroot.Part1 = char.Torso
  104. local rhandclone = owner.Character.Torso["Right Shoulder"]:Clone()
  105. local rhandweld = Instance.new("Weld", owner.Character.Torso)
  106. rhandweld.Part0 = owner.Character.Torso
  107. rhandweld.Part1 = owner.Character["Right Arm"]
  108. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  109. local lhandclone = owner.Character.Torso["Left Shoulder"]:Clone()
  110. local lhandweld = Instance.new("Weld", owner.Character.Torso)
  111. lhandweld.Part0 = owner.Character.Torso
  112. lhandweld.Part1 = owner.Character["Left Arm"]
  113. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  114. local llegweld = Instance.new("Weld", owner.Character.Torso)
  115. llegweld.Part0 = owner.Character.Torso
  116. llegweld.Part1 = owner.Character["Left Leg"]
  117. llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0)
  118. local rlegclone = owner.Character.Torso["Right Hip"]:Clone()
  119. owner.Character.Torso["Right Hip"]:Remove()
  120. local rlegweld = Instance.new("Weld", owner.Character.Torso)
  121. rlegweld.Part0 = owner.Character.Torso
  122. rlegweld.Part1 = owner.Character["Right Leg"]
  123. rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0)
  124.  
  125.  
  126. for i = 0,1 ,0.03 do
  127. humanroot.C0 = humanroot.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.861433148, -0.507871091, 0, 0.507871091, 0.861433148):inverse(),i)
  128. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.0847580433, -0.504649997, 1, 0, 0, 0, 0.826165259, -0.563427925, 0, 0.563427925, 0.826165259),i)
  129. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.9787972, -0.643271148, 0, 0, -1, -0.519508898, 0.854465187, 0, 0.854465187, 0.519508898, 0),i)
  130. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.0881803036, -0.315132141, 1, 0, 0, 0, 0.840211272, -0.542259157, 0, 0.542259157, 0.840211272),i)
  131. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.95825088, -0.666816115, 0, 0, 1, 0.529378891, 0.848385572, 0, -0.848385572, 0.529378891, 0),i)
  132. neck.C0 = neck.C0:lerp(CFrame.new(0, 1.39824653, 0.172113657, 1, 0, 0, 0, 0.860818028, -0.50891304, 0, 0.50891304, 0.860818028),i)
  133. game:GetService("RunService").Stepped:wait()
  134. end
  135. local SCREENGUI = Instance.new("ScreenGui",plr.PlayerGui)
  136. local IMAGE = Instance.new("ImageButton",SCREENGUI)
  137. IMAGE.Image = "rbxassetid://39637251"
  138. IMAGE.Size = UDim2.new(0.228, 0,0.154, 0)
  139. IMAGE.Position = UDim2.new(0.368, 0,0.534, 0)
  140. IMAGE.BackgroundTransparency = 1
  141. IMAGE.BorderSizePixel = 0
  142. SpinDashCharge = Instance.new("Sound",char)
  143. SpinDashCharge.SoundId = "rbxassetid://159335846"
  144. SpinDashCharge.Volume = 4
  145. Boost = Instance.new("Sound",char)
  146. Boost.SoundId = "rbxassetid://1192337951"
  147. Boost.Volume = 6
  148. Boost.Looped = true
  149. Boost:Play()
  150. Charge = 0
  151. char.Humanoid.JumpPower = 0
  152. Pressed = false
  153. function ChargeBoost()
  154. Charge = Charge + 5
  155. SpinDashCharge:Play()
  156. end
  157. game:GetService("UserInputService").InputBegan:Connect(function(key)
  158. if key.UserInputType == Enum.UserInputType.Keyboard then
  159. if key.KeyCode == Enum.KeyCode.Space and SCREENGUI.Parent ~= nil then
  160. ChargeBoost()
  161. Pressed = true
  162. end
  163. end
  164. end)
  165. wait(5)
  166. SCREENGUI.Parent = nil
  167. char.Humanoid.WalkSpeed = 16 + Charge
  168. char.Humanoid.JumpPower = 50
  169. BoostColor = BrickColor.new("Bright blue")
  170. if Pressed == false then
  171. char.Humanoid.WalkSpeed = 80
  172. end
  173.  
  174. local trail = Instance.new("Trail",char)
  175. trail.Attachment0 = char.Head.FaceCenterAttachment
  176. trail.Attachment1 = char.HumanoidRootPart.RootAttachment
  177. trail.Color = ColorSequence.new(BoostColor.Color)
  178. trail.MaxLength = 0
  179. trail.Lifetime = 0.5
  180.  
  181. local pose = "Standing"
  182.  
  183. char.Torso.Touched:connect(function(part)
  184. local hum = part.Parent:FindFirstChildOfClass("Humanoid")
  185. if hum and pose == "Walking" then
  186. hum.Health = 0
  187. else
  188. hum.Health = 100
  189. end
  190. end)
  191. local chara = workspace:WaitForChild(plr.Name)
  192. local human = chara.Humanoid
  193.  
  194. local speed = 0
  195.  
  196. human.Running:connect(function(s)
  197. speed = s
  198. end)
  199. cananimate = true
  200. local update = game:GetService("RunService")
  201. update.Stepped:connect(function()
  202. local ray = Ray.new(chara.Torso.Position, (chara.Torso.Position - Vector3.new(0,9999999,0)).unit * 300)
  203. local p, position = game.Workspace:FindPartOnRay(ray, char, true, false)
  204. local dis = (chara.Torso.Position - position).magnitude
  205. if dis > 3.8 and chara.Torso.Velocity.Y > 0 then
  206. pose = "Jumping"
  207. end
  208. if dis> 3.8 and chara.Torso.Velocity.Y < 0 then
  209. pose = "Falling"
  210. end
  211. if dis < 3.8 and speed == 0 then
  212. pose = "Standing"
  213. end
  214. if dis < 3.8 and speed > 0 then
  215. pose = "Walking"
  216. end
  217. end)
  218. while true do
  219. wait()
  220. if pose == "Standing" and cananimate then
  221. for i = 0,1 ,0.03 do
  222. humanroot.C0 = humanroot.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.861433148, -0.507871091, 0, 0.507871091, 0.861433148):inverse(),i)
  223. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.0847580433, -0.504649997, 1, 0, 0, 0, 0.826165259, -0.563427925, 0, 0.563427925, 0.826165259),i)
  224. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.9787972, -0.643271148, 0, 0, -1, -0.519508898, 0.854465187, 0, 0.854465187, 0.519508898, 0),i)
  225. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.0881803036, -0.315132141, 1, 0, 0, 0, 0.840211272, -0.542259157, 0, 0.542259157, 0.840211272),i)
  226. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.95825088, -0.666816115, 0, 0, 1, 0.529378891, 0.848385572, 0, -0.848385572, 0.529378891, 0),i)
  227. neck.C0 = neck.C0:lerp(CFrame.new(0, 1.39824653, 0.172113657, 1, 0, 0, 0, 0.860818028, -0.50891304, 0, 0.50891304, 0.860818028),i)
  228. game:GetService("RunService").Stepped:wait()
  229. end
  230. end
  231. if pose == "Walking" and cananimate then
  232. for i = 0,1 , 0.3 do
  233. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.49999845, 0.0116631985, 0.62646699, 1.00000012, 3.50177288e-07, -2.71806493e-06, 2.0340085e-06, 0.568486691, 0.822692573, 1.83284283e-06, -0.822692692, 0.568486571),i)
  234. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.50001049, -1.33467507, -1.34572363, 1.00135803e-05, -5.93066216e-06, 1.00000012, 0.95380795, 0.300417304, -7.76350498e-06, -0.300417483, 0.95380795, 8.65757465e-06),i)
  235. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -2.06321907, 0.382456064, 1.89989805e-07, 2.23517418e-07, -1.00000012, 0.324321806, 0.945946872, 2.71946192e-07, 0.945946872, -0.324321896, 1.11758709e-07),i)
  236. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.50000167, 0.160489321, 0.409729481, 1.00000012, 3.7252903e-07, -2.71759927e-06, 2.0340085e-06, 0.565193176, 0.824958682, 1.83284283e-06, -0.824958742, 0.565193117),i)
  237. game:GetService("RunService").Stepped:wait()
  238. end
  239. for i = 0,1 , 0.3 do
  240. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.500000715, -1.4970336, -1.30027473, 2.85357237e-06, -1.40443444e-06, -1.00000012, -0.956139505, 0.292911917, -3.14414501e-06, 0.292912006, 0.956139505, -4.991889e-07),i)
  241. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.499979883, -1.99265182, 0.346698284, 1.71288848e-05, 6.40004873e-06, 1.00000012, -0.34762764, 0.93763268, -4.09781933e-08, -0.937632799, -0.34762764, 1.82762742e-05),i)
  242. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.49999845, 0.0116631985, 0.62646699, 1.00000012, 3.50177288e-07, -2.71806493e-06, 2.0340085e-06, 0.568486691, 0.822692573, 1.83284283e-06, -0.822692692, 0.568486571),i)
  243. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.50000167, 0.160489321, 0.409729481, 1.00000012, 3.7252903e-07, -2.71759927e-06, 2.0340085e-06, 0.565193176, 0.824958682, 1.83284283e-06, -0.824958742, 0.565193117),i)
  244. end
  245. end
  246. if pose == "Jumping" and cananimate then
  247. for i = 0,1 , 0.05 do
  248. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.999999285, 0.000862598419, 1, 0, 0, 0, -0.99999845, 0.00172528333, 0, -0.00172528345, -0.99999851),i)
  249. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.999960184, -0.00631046295, 1, 0, 0, 0, -0.999920309, -0.0126213925, 0, 0.0126213934, -0.999920368),i)
  250. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  251. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  252. update.Stepped:wait()
  253. end
  254. end
  255. if pose == "Falling" and cananimate then
  256. for i = 0,1 , 0.05 do
  257. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.999999285, 0.000862598419, 1, 0, 0, 0, -0.99999845, 0.00172528333, 0, -0.00172528345, -0.99999851),i)
  258. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.999960184, -0.00631046295, 1, 0, 0, 0, -0.999920309, -0.0126213925, 0, 0.0126213934, -0.999920368),i)
  259. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  260. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  261. update.Stepped:wait()
  262. end
  263. end
  264. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement