Advertisement
lafur

Untitled

Mar 24th, 2019
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.43 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end mouse = game.Players.LocalPlayer:GetMouse()
  6. used = false
  7. attacking = false
  8. smashing = false
  9. kick = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
  10. kick.SoundId = "rbxassetid://507150998"
  11. kick.Volume = 6
  12. kick1 = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
  13. kick1.SoundId = "rbxassetid://169380525"
  14. kick1.Volume = 6
  15. kick11 = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
  16. kick11.SoundId = "rbxassetid://165969964"
  17. kick11.Volume = 50
  18. function sensor(key)
  19. key = key:lower()
  20. if key == "e" then
  21. if not used then
  22. used = true
  23. local detect = Instance.new("Part", game.Players.LocalPlayer.Character)
  24. detect.Size = Vector3.new(1,1,4)
  25. detect:BreakJoints()
  26. detect.CanCollide = false
  27. detect.Transparency = 0.9
  28. detect.BrickColor = BrickColor.new("Really red")
  29. local weld = Instance.new("Weld", detect)
  30. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  31. weld.Part1 = detect
  32. weld.C0 = weld.C0 * CFrame.new(0,-1,0)
  33. local function attack(part)
  34. if not attacking then
  35. attacking = true
  36. local torso = part.Parent:findFirstChild("Torso")
  37. if torso ~= nil then
  38. local humanoid = part.Parent:findFirstChild("Humanoid")
  39. if humanoid ~= nil then
  40. local weld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  41. humanoid.WalkSpeed = 0
  42. humanoid.JumpPower = 0
  43. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  44. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
  45. for i = 1,5 do
  46. wait()
  47. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  48. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  49. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,0.2)
  50. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,0.2)
  51. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(-0.2,0,0)
  52. end
  53. kick:Play()
  54. used = true
  55. local bodyvelocity = Instance.new("BodyVelocity", torso)
  56. bodyvelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 67
  57. bodyvelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  58. wait(1.4)
  59. local bodyposition = Instance.new("BodyPosition", torso)
  60. bodyposition.Position = torso.Position
  61. bodyposition.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  62. bodyvelocity:destroy()
  63. wait(1)
  64. for i = 1,5 do
  65. wait()
  66. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  67. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  68. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,-0.2)
  69. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,-0.2)
  70. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0.2,0,0)
  71. end
  72. for i = 1,5 do
  73. wait()
  74. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  75. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  76. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,0.2)
  77. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,-0.2)
  78. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0.2,0,0)
  79. end
  80. wait(1)
  81. for i = 1,5 do
  82. wait()
  83. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  84. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  85. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,-0.1)
  86. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,0.1)
  87. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(-0.1,0,0)
  88. end
  89. local bodypositionme = Instance.new("BodyPosition", game.Players.LocalPlayer.Character.Torso)
  90. bodypositionme.Position = torso.Position
  91. bodypositionme.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  92. wait(1.1)
  93. for i = 1,5 do
  94. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  95. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  96. end
  97. kick1:Play()
  98. bodypositionme:destroy()
  99. local torsowelding = Instance.new("Weld", torso)
  100. torsowelding.Part0 = torso
  101. torsowelding.Part1 = game.Players.LocalPlayer.Character.Torso
  102. torsowelding.C0 = torsowelding.C0 * CFrame.new(0,0,-2)
  103. torsowelding.C0 = torsowelding.C0 * CFrame.Angles(0,3.08,0)
  104. wait(1.3)
  105. torsowelding:destroy()
  106. bodyposition:destroy()
  107. local mybodyvel = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.Torso)
  108. mybodyvel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * -90
  109. mybodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  110. local bodyvel = Instance.new("BodyVelocity", torso)
  111. bodyvel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 80
  112. bodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  113. humanoid.PlatformStand = true
  114. wait(0.3)
  115. bodyvel:destroy()
  116. mybodyvel:destroy()
  117. wait(0.25)
  118. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  119. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  120. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  121. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  122. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  123. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  124. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  125. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
  126. wait(2.5)
  127. local block = Instance.new("Part", workspace)
  128. block.Position = torso.Position + Vector3.new(0,500,0)
  129. block.Size = Vector3.new(50,70,50)
  130. local function smash()
  131. if not smashing then
  132. smashing = true
  133. local explosion = Instance.new("Explosion", block)
  134. explosion.BlastRadius = 45
  135. humanoid.Health = 0
  136. kick11:Play()
  137. explosion.Position = torso.Position
  138. wait(6)
  139. smashing = false
  140. end
  141. end
  142. block.Touched:connect(smash)
  143. used = false
  144. attacking = false
  145. wait(7)
  146. block:destroy()
  147. end
  148. end
  149. wait(1)
  150. attacking = false
  151. end
  152. end
  153. detect.Touched:connect(attack)
  154. wait(0.1)
  155. detect:destroy()
  156. used = false
  157. end
  158. end
  159. end
  160. mouse.KeyDown:connect(sensor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement