Advertisement
ManOhMan

Untitled

Jun 26th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  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. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. plyr = owner
  87. char = plyr.Character
  88. torso = char.Torso
  89. Run = game:service'RunService'
  90. deb = game:service'Debris'
  91. ra = char["Right Arm"]
  92. la = char["Left Arm"]
  93. rs = char.Torso["Right Shoulder"]
  94. ls = char.Torso["Left Shoulder"]
  95. local platform = false
  96. local idle = true
  97. iliketrains = {}
  98.  
  99.  
  100. part1 = Instance.new("Part", char)
  101. part1.FormFactor = "Symmetric"
  102. part1.Size = Vector3.new(1, 3, 1)
  103. part1.TopSurface = 0
  104. part1.BottomSurface = 0
  105. part1:BreakJoints()
  106. special = Instance.new("SpecialMesh", part1)
  107. special.MeshId = "http://www.roblox.com/asset/?id=25498565"
  108. special.TextureId = "http://www.roblox.com/asset/?id=26725707"
  109. special.Scale = Vector3.new(2, 2, 2)
  110. w = Instance.new("Weld", char)
  111. w.Part0 = part1
  112. w.Part1 = torso
  113. w.C0 = CFrame.new(-0.4, -1.4, -0.5) * CFrame.Angles(-0.5, 0, 0.2)
  114. part2 = Instance.new("Part", char)
  115. part2.FormFactor = "Symmetric"
  116. part2.Size = Vector3.new(1, 3, 1)
  117. part2.TopSurface = 0
  118. part2.BottomSurface = 0
  119. part2:BreakJoints()
  120. special2 = Instance.new("SpecialMesh", part2)
  121. special2.MeshId = "http://www.roblox.com/asset/?id=25498565"
  122. special2.TextureId = "http://www.roblox.com/asset/?id=26725707"
  123. special2.Scale = Vector3.new(2, 2, 2)
  124. w2 = Instance.new("Weld", char)
  125. w2.Part0 = part2
  126. w2.Part1 = torso
  127. w2.C0 = CFrame.new(0.4, -1.4, -0.5) * CFrame.Angles(-0.5, 0, -0.2)
  128.  
  129.  
  130.  
  131. tool = Instance.new("HopperBin", plyr.Backpack)
  132. tool.Name = " "
  133. tool.TextureId = "http://www.roblox.com/asset/?id=27471616"
  134. tool.Selected:connect(function(mouse)
  135.  
  136.  
  137. mouse.Button1Down:connect(function(mouse)
  138. if equipped then return end
  139. equipped = true
  140. coroutine.wrap(function()
  141. while equipped do
  142. rs.DesiredAngle = 0
  143. rs.CurrentAngle = 0
  144. ls.DesiredAngle = 0
  145. ls.CurrentAngle = 0
  146. Run.Stepped:wait()
  147. end
  148. end)()
  149. coroutine.wrap(function()
  150. idle = false
  151. coroutine.wrap(function()
  152. for i = 0, 3 do
  153. w.C0 = w.C0 * CFrame.new(0, 0.05, 0)
  154. w2.C0 = w2.C0 * CFrame.new(0, 0.05, 0)
  155. Run.Stepped:wait()
  156. end
  157. wait(0.147)
  158. for i = 0, 3 do
  159. w.C0 = w.C0 * CFrame.new(0, -0.05, 0)
  160. w2.C0 = w2.C0 * CFrame.new(0, -0.05, 0)
  161. Run.Stepped:wait()
  162. end
  163. end)()
  164. local p = Instance.new("Part", char)
  165. p.FormFactor = "Custom"
  166. p.Name = "Platform"
  167. p.Transparency = 1
  168. p.Size = Vector3.new(4, 1, 4)
  169. p.Anchored = true
  170. for i = 2.5, 6, 0.05 do
  171. p.CFrame = CFrame.new(torso.CFrame.x, torso.CFrame.y-i, torso.CFrame.z)
  172. Run.Stepped:wait()
  173. end
  174. coroutine.wrap(function()
  175. p:Destroy()
  176. end)()
  177. end)()
  178. for i = 0, 4 do
  179. ls.C0 = ls.C0 * CFrame.Angles(-0.25, 0, 0)
  180. rs.C0 = rs.C0 * CFrame.Angles(-0.25, 0, 0)
  181. Run.Stepped:wait()
  182. end
  183. wait(0.02)
  184. for i = 0, 4 do
  185. ls.C0 = ls.C0 * CFrame.Angles(0.25, 0, 0)
  186. rs.C0 = rs.C0 * CFrame.Angles(0.25, 0, 0)
  187. Run.Stepped:wait()
  188. end
  189. idle = true
  190. equipped = false
  191. end)
  192. end)
  193.  
  194.  
  195.  
  196. while idle do
  197. for i = 0, 3 do
  198. w.C0 = w.C0 * CFrame.Angles(0, 0.002 * i, 0)
  199. w2.C0 = w2.C0 * CFrame.Angles(0, -0.002 * i, 0)
  200. Run.Stepped:wait()
  201. end
  202. wait(0.112687)
  203. for i = 0, 3 do
  204. w.C0 = w.C0 * CFrame.Angles(0, -0.002 * i, 0)
  205. w2.C0 = w2.C0 * CFrame.Angles(0, 0.002 * i, 0)
  206. Run.Stepped:wait()
  207. end
  208. wait(0.312687)
  209. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement