Advertisement
Guest User

Roblox Fe script

a guest
Jan 22nd, 2019
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.52 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
  6.  
  7. -- By Theamazingnater
  8. char = game.Players.LocalPlayer.Character
  9. local music = Instance.new("Sound",char)
  10. music.Volume = 1
  11. music.SoundId = "rbxassetid://853707984"
  12. music.Looped = true
  13. music:Play()
  14. local ban = Instance.new("Sound",char.Torso)
  15. ban.SoundId = "rbxassetid://147722910"
  16. ban.Volume = 10
  17. local banh = Instance.new("Part",char)
  18. banh.Name = "BAN!"
  19. banh.Size = Vector3.new(1, 5.2, 1)
  20. banh.CanCollide = false
  21. local banm = Instance.new("FileMesh",banh)
  22. banm.MeshId = "http://www.roblox.com/asset/?id=10604848"
  23. banm.TextureId = "http://www.roblox.com/asset/?id=10605252"
  24. banm.Scale = Vector3.new(0.5,0.5,0.5)
  25. local weld = Instance.new("Weld",banh)
  26. weld.Part0 = banh
  27. weld.Part1 = char["Right Arm"]
  28. weld.C0 = CFrame.new(0.0185670853, -1.69550169, -1.06726038, -0.997520506, 0.00503299711, 0.0701959729, -0.0702080429, -0.00226099929, -0.997529864, -0.00486185262, -0.999984622, 0.00260874978)
  29. mouse = game.Players.LocalPlayer:GetMouse()
  30. local llegclone = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  31. game.Players.LocalPlayer.Character.Torso["Left Hip"]:Remove()
  32. local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  33. llegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  34. llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"]
  35. llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0)
  36. local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  37. game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove()
  38. local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  39. rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  40. rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"]
  41. rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0)
  42. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  43. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  44. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  45. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  46. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  47. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  48. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  49. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  50. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  51. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  52. local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  53. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
  54. local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  55. humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
  56. humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
  57. local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  58. local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  59. headweld.Part0 = game.Players.LocalPlayer.Character.Torso
  60. headweld.Part1 = game.Players.LocalPlayer.Character.Head
  61. headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
  62. using = false
  63. cananimate = true
  64. for i = 0,1 , 0.03 do
  65. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
  66. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.398939848, -0.585105896, 1.00000012, 3.85171006e-10, 1.11758709e-08, 9.31322042e-09, -0.0281364974, -0.99960357, -1.16415322e-10, 0.999603391, -0.0281365328),i)
  67. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.75279808, -1.92294025, 0, 0.985477746, 0.16980496, 0, -0.16980496, 0.985477746, 0, 0, 0, 1),i)
  68. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.696445823, -1.93322277, 0, 0.946795106, -0.321837038, 0, 0.321837038, 0.946795106, 0, 0, 0, 1),i)
  69. game:GetService("RunService").RenderStepped:wait()
  70. end
  71. function Ban(dude)
  72. local display = dude:FindFirstChild("Head"):Clone()
  73. display.Parent = workspace
  74. display.Transparency = 1
  75. display:FindFirstChildOfClass("Decal"):Destroy()
  76. display.Anchored = true
  77. display.CanCollide = false
  78. local txt = Instance.new("BillboardGui", display)
  79. txt.Adornee = display
  80. txt.Name = "Nametag"
  81. txt.Size = UDim2.new(2, 0, 1.2, 0)
  82. txt.StudsOffset = Vector3.new(-9, 6, 0)
  83. local text = Instance.new("TextLabel", txt)
  84. text.Size = UDim2.new(10, 0, 7, 0)
  85. text.TextSize = 30
  86. text.Font = Enum.Font.Arcade
  87. text.TextScaled = false
  88. text.BackgroundTransparency = 1
  89. text.TextColor3 = BrickColor.new("Really blue").Color
  90. text.TextStrokeTransparency = 0
  91. text.TextStrokeColor3 = Color3.new(0,0,0)
  92. text.Text = "Banned!"
  93. game:GetService("Debris"):AddItem(display,2)
  94. dude:Destroy()
  95. end
  96.  
  97. function swing()
  98. if not using then
  99. using = true
  100. cananimate = false
  101. for i = 0,1 , 0.045 do
  102. weld.C0 = weld.C0:lerp(CFrame.new(0.152735472, -1.66358948, -1.08551645, -0.0427260287, 0.00281231292, 0.999082863, -0.999074996, 0.00474835932, -0.0427390598, -0.00486420048, -0.999984741, 0.00260683335),i)
  103. headweld.C0 = headweld.C0:lerp(CFrame.new(-4.65661287e-10, 1.49999952, 0, 0.601507425, -2.32830644e-10, 0.798867226, 3.0559022e-10, 1, 0, -0.798867226, -4.65661287e-10, 0.601507425),i)
  104. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.63088727, -0.00573391188, -0.775853336, 0, 0.999972701, -0.00739025697, 0.775874496, 0.00466241874, 0.630870044),i)
  105. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(0.0363237262, 0.350219727, -1.1563791, 0.495106995, -0.857149601, 0.1419992, 0.110766649, -0.0998312235, -0.988819599, 0.861742377, 0.505300522, 0.0455164276),i)
  106. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.50056481, 0.516354084, -0.499166548, 0.995925009, -0.00520473719, 0.09003409, 0.0901844054, 0.0574772507, -0.994265079, -2.98023224e-08, 0.998333335, 0.057712432),i)
  107. game:GetService("RunService").RenderStepped:wait()
  108. end
  109. local hitbox = Instance.new("Part",banh)
  110. hitbox.Name = "HurtBox"
  111. hitbox.Size = Vector3.new(2.09, 3.4, 1.8)
  112. hitbox.Transparency = 1
  113. local hitboxwe = Instance.new("Weld",hitbox)
  114. hitboxwe.Part0 = hitbox
  115. hitboxwe.Part1 = banh
  116. hitboxwe.C0 = CFrame.new(0.230496407, 0.228847623, 1.76342273, -0.997520506, -0.0702080652, -0.00486185262, 0.00503299385, -0.00226099882, -0.999983966, 0.070195958, -0.997529984, 0.00260874908)
  117. function getbanned(part)
  118. local human = part.Parent:FindFirstChildOfClass("Humanoid")
  119. if human then
  120. ban:Play()
  121. Ban(human.Parent)
  122. end
  123. end
  124. hitbox.Touched:connect(getbanned)
  125. for i = 0,1 , 0.08 do
  126. headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0249017328, 1.48724031, 2.04332173e-06, 0.499998868, 0, -0.866026163, 0, 1, 0, 0.866026163, 0, 0.499998868),i)
  127. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.305942208, 0, -0.952050149, 0, 1, 0, 0.952050149, 0, 0.305942208):inverse(),i)
  128. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.07653618, 0.305679321, -0.818206966, 0.707105398, -0.707108259, 4.32133675e-07, 0.122787982, 0.122786887, -0.984807909, 0.696365714, 0.696363032, 0.173647687),i)
  129. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.74788636, 0.363031864, -0.7663396, 0.70710665, 0.707106948, -2.23517418e-08, -0.0616280138, 0.061627958, -0.99619478, -0.704416275, 0.704416037, 0.0871551335),i)
  130. game:GetService("RunService").RenderStepped:wait()
  131. end
  132. using = false
  133. cananimate = true
  134. hitbox:Destroy()
  135. weld.C0 = CFrame.new(0.0185670853, -1.69550169, -1.06726038, -0.997520506, 0.00503299711, 0.0701959729, -0.0702080429, -0.00226099929, -0.997529864, -0.00486185262, -0.999984622, 0.00260874978)
  136. end
  137. end
  138. mouse.Button1Down:connect(swing)
  139.  
  140. while true do
  141. if cananimate then
  142. --Walking animation
  143. if game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  144. for i = 0.1,0.3 , 0.008 do
  145. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  146. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  147. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  148. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53402293, 0.0594797134, 0.144087285, 0.997264206, 0.0707819909, 0.0213012099, -0.0739177391, 0.9549582, 0.287386209, 2.98023224e-08, -0.28817457, 0.957577825),i)
  149. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54035091, 0.0769848824, -0.170524538, 0.99592495, -0.0847774297, 0.0307573378, 0.090184398, 0.936214805, -0.339659303, 0, 0.341049016, 0.940045416),i)
  150. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.67391682, -0.738807678, 0.99999994, 0, 0, 0, 0.673916757, -0.738807261, 0, 0.738807321, 0.673916817),i)
  151. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.67705727, 0.735931396, 1, 0, 0, 0, 0.677056909, 0.735930681, 0, -0.735930741, 0.677056968),i)
  152. game:GetService("RunService").Stepped:wait()
  153. end
  154. end
  155. for i = 0.1,0.3 , 0.008 do
  156. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  157. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  158. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  159. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.69855976, 0.715551376, 1, 0, 0, 0, 0.698559642, 0.715551734, 0, -0.715551794, 0.698559701),i)
  160. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.80723953, -0.590223312, 1, 0, 0, 0, 0.807239354, -0.590224087, 0, 0.590224147, 0.807239413),i)
  161. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53173375, 0.0903658867, -0.222393572, 0.997264206, 0.0662034005, -0.0328776538, -0.0739177391, 0.893185973, -0.443570435, 2.98023224e-08, 0.444787204, 0.895636141),i)
  162. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54079688, 0.0720610619, 0.156226337, 0.99592495, -0.085669145, -0.0281783342, 0.090184398, 0.946062148, 0.311179608, 0, -0.312452823, 0.949932992),i)
  163. game:GetService("RunService").Stepped:wait()
  164. end
  165. end
  166. -- Idle animation
  167. elseif game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 then
  168. for i = 0,1 , 0.1 do
  169. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 and cananimate then
  170. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  171. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  172. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
  173. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.398939848, -0.585105896, 1.00000012, 3.85171006e-10, 1.11758709e-08, 9.31322042e-09, -0.0281364974, -0.99960357, -1.16415322e-10, 0.999603391, -0.0281365328),i)
  174. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.75279808, -1.92294025, 0, 0.985477746, 0.16980496, 0, -0.16980496, 0.985477746, 0, 0, 0, 1),i)
  175. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.696445823, -1.93322277, 0, 0.946795106, -0.321837038, 0, 0.321837038, 0.946795106, 0, 0, 0, 1),i)
  176. game:GetService("RunService").RenderStepped:wait()
  177. end
  178. end
  179. end
  180. end
  181. wait()
  182. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement