Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.77 KB | None | 0 0
  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. --------
  87. -- By Theamazingnater
  88. char = owner
  89. local music = Instance.new("Sound",char)
  90. music.Volume = 1
  91. music.SoundId = "rbxassetid://853707984"
  92. music.Looped = true
  93. music:Play()
  94. local ban = Instance.new("Sound",char.Torso)
  95. ban.SoundId = "rbxassetid://147722910"
  96. ban.Volume = 10
  97. local banh = Instance.new("Part",char)
  98. banh.Name = "BAN!"
  99. banh.Size = Vector3.new(1, 5.2, 1)
  100. banh.CanCollide = false
  101. local banm = Instance.new("FileMesh",banh)
  102. banm.MeshId = "http://www.roblox.com/asset/?id=10604848"
  103. banm.TextureId = "http://www.roblox.com/asset/?id=10605252"
  104. banm.Scale = Vector3.new(0.5,0.5,0.5)
  105. local weld = Instance.new("Weld",banh)
  106. weld.Part0 = banh
  107. weld.Part1 = char["Right Arm"]
  108. 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)
  109. local llegclone = owner
  110. game.Players.LocalPlayer.Character.Torso["Left Hip"]:Remove()
  111. local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  112. llegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  113. llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"]
  114. llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0)
  115. local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  116. game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove()
  117. local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  118. rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  119. rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"]
  120. rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0)
  121. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  122. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  123. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  124. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  125. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  126. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  127. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  128. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  129. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  130. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  131. local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  132. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
  133. local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  134. humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
  135. humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
  136. local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  137. local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  138. headweld.Part0 = game.Players.LocalPlayer.Character.Torso
  139. headweld.Part1 = game.Players.LocalPlayer.Character.Head
  140. headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
  141. using = false
  142. cananimate = true
  143. for i = 0,1 , 0.03 do
  144. 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)
  145. 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)
  146. 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)
  147. 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)
  148. game:GetService("RunService").RenderStepped:wait()
  149. end
  150. function Ban(dude)
  151. local display = dude:FindFirstChild("Head"):Clone()
  152. display.Parent = workspace
  153. display.Transparency = 1
  154. display:FindFirstChildOfClass("Decal"):Destroy()
  155. display.Anchored = true
  156. display.CanCollide = false
  157. local txt = Instance.new("BillboardGui", display)
  158. txt.Adornee = display
  159. txt.Name = "Nametag"
  160. txt.Size = UDim2.new(2, 0, 1.2, 0)
  161. txt.StudsOffset = Vector3.new(-9, 6, 0)
  162. local text = Instance.new("TextLabel", txt)
  163. text.Size = UDim2.new(10, 0, 7, 0)
  164. text.TextSize = 30
  165. text.Font = Enum.Font.Arcade
  166. text.TextScaled = false
  167. text.BackgroundTransparency = 1
  168. text.TextColor3 = BrickColor.new("Really blue").Color
  169. text.TextStrokeTransparency = 0
  170. text.TextStrokeColor3 = Color3.new(0,0,0)
  171. text.Text = "Banned!"
  172. game:GetService("Debris"):AddItem(display,2)
  173. dude:Destroy()
  174. end
  175.  
  176. function swing()
  177. if not using then
  178. using = true
  179. cananimate = false
  180. for i = 0,1 , 0.045 do
  181. 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)
  182. 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)
  183. 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)
  184. 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)
  185. 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)
  186. game:GetService("RunService").RenderStepped:wait()
  187. end
  188. local hitbox = Instance.new("Part",banh)
  189. hitbox.Name = "HurtBox"
  190. hitbox.Size = Vector3.new(2.09, 3.4, 1.8)
  191. hitbox.Transparency = 1
  192. local hitboxwe = Instance.new("Weld",hitbox)
  193. hitboxwe.Part0 = hitbox
  194. hitboxwe.Part1 = banh
  195. 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)
  196. function getbanned(part)
  197. local human = part.Parent:FindFirstChildOfClass("Humanoid")
  198. if human then
  199. ban:Play()
  200. Ban(human.Parent)
  201. end
  202. end
  203. hitbox.Touched:connect(getbanned)
  204. for i = 0,1 , 0.08 do
  205. 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)
  206. 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)
  207. 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)
  208. 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)
  209. game:GetService("RunService").RenderStepped:wait()
  210. end
  211. using = false
  212. cananimate = true
  213. hitbox:Destroy()
  214. 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)
  215. end
  216. end
  217. mouse.Button1Down:connect(swing)
  218.  
  219. while true do
  220. if cananimate then
  221. --Walking animation
  222. 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
  223. for i = 0.1,0.3 , 0.008 do
  224. 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
  225. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  226. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  227. 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)
  228. 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)
  229. 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)
  230. 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)
  231. game:GetService("RunService").Stepped:wait()
  232. end
  233. end
  234. for i = 0.1,0.3 , 0.008 do
  235. 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
  236. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  237. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  238. 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)
  239. 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)
  240. 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)
  241. 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)
  242. game:GetService("RunService").Stepped:wait()
  243. end
  244. end
  245. -- Idle animation
  246. 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
  247. for i = 0,1 , 0.1 do
  248. 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
  249. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  250. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  251. 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)
  252. 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)
  253. 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)
  254. 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)
  255. game:GetService("RunService").RenderStepped:wait()
  256. end
  257. end
  258. end
  259. end
  260. wait()
  261. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement