Advertisement
ghostteen14

Untitled

May 13th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.79 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  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,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Joseph Deramus")
  9. local rp = RealPlayer
  10. script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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 then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. -- By Theamazingnater
  148. char = game.Players.LocalPlayer.Character
  149. local music = Instance.new("Sound",char)
  150. music.Volume = 1
  151. music.SoundId = "rbxassetid://853707984"
  152. music.Looped = true
  153. music:Play()
  154. local ban = Instance.new("Sound",char.Torso)
  155. ban.SoundId = "rbxassetid://147722910"
  156. ban.Volume = 10
  157. local banh = Instance.new("Part",char)
  158. banh.Name = "BAN!"
  159. banh.Size = Vector3.new(1, 5.2, 1)
  160. banh.CanCollide = false
  161. local banm = Instance.new("FileMesh",banh)
  162. banm.MeshId = "http://www.roblox.com/asset/?id=10604848"
  163. banm.TextureId = "http://www.roblox.com/asset/?id=10605252"
  164. banm.Scale = Vector3.new(0.5,0.5,0.5)
  165. local weld = Instance.new("Weld",banh)
  166. weld.Part0 = banh
  167. weld.Part1 = char["Right Arm"]
  168. 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)
  169. mouse = game.Players.LocalPlayer:GetMouse()
  170. local llegclone = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  171. game.Players.LocalPlayer.Character.Torso["Left Hip"]:Remove()
  172. local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  173. llegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  174. llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"]
  175. llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0)
  176. local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  177. game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove()
  178. local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  179. rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  180. rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"]
  181. rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0)
  182. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  183. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  184. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  185. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  186. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  187. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  188. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  189. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  190. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  191. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  192. local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  193. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
  194. local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  195. humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
  196. humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
  197. local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  198. local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  199. headweld.Part0 = game.Players.LocalPlayer.Character.Torso
  200. headweld.Part1 = game.Players.LocalPlayer.Character.Head
  201. headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
  202. using = false
  203. cananimate = true
  204. for i = 0,1 , 0.03 do
  205. 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)
  206. 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)
  207. 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)
  208. 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)
  209. game:GetService("RunService").RenderStepped:wait()
  210. end
  211. function Ban(dude)
  212. local display = dude:FindFirstChild("Head"):Clone()
  213. display.Parent = workspace
  214. display.Transparency = 1
  215. display:FindFirstChildOfClass("Decal"):Destroy()
  216. display.Anchored = true
  217. display.CanCollide = false
  218. local txt = Instance.new("BillboardGui", display)
  219. txt.Adornee = display
  220. txt.Name = "Nametag"
  221. txt.Size = UDim2.new(2, 0, 1.2, 0)
  222. txt.StudsOffset = Vector3.new(-9, 6, 0)
  223. local text = Instance.new("TextLabel", txt)
  224. text.Size = UDim2.new(10, 0, 7, 0)
  225. text.TextSize = 30
  226. text.Font = Enum.Font.Arcade
  227. text.TextScaled = false
  228. text.BackgroundTransparency = 1
  229. text.TextColor3 = BrickColor.new("Really blue").Color
  230. text.TextStrokeTransparency = 0
  231. text.TextStrokeColor3 = Color3.new(0,0,0)
  232. text.Text = "Banned!"
  233. game:GetService("Debris"):AddItem(display,2)
  234. dude:Destroy()
  235. end
  236.  
  237. function swing()
  238. if not using then
  239. using = true
  240. cananimate = false
  241. for i = 0,1 , 0.045 do
  242. 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)
  243. 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)
  244. 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)
  245. 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)
  246. 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)
  247. game:GetService("RunService").RenderStepped:wait()
  248. end
  249. local hitbox = Instance.new("Part",banh)
  250. hitbox.Name = "HurtBox"
  251. hitbox.Size = Vector3.new(2.09, 3.4, 1.8)
  252. hitbox.Transparency = 1
  253. local hitboxwe = Instance.new("Weld",hitbox)
  254. hitboxwe.Part0 = hitbox
  255. hitboxwe.Part1 = banh
  256. 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)
  257. function getbanned(part)
  258. local human = part.Parent:FindFirstChildOfClass("Humanoid")
  259. if human then
  260. ban:Play()
  261. Ban(human.Parent)
  262. end
  263. end
  264. hitbox.Touched:connect(getbanned)
  265. for i = 0,1 , 0.08 do
  266. 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)
  267. 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)
  268. 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)
  269. 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)
  270. game:GetService("RunService").RenderStepped:wait()
  271. end
  272. using = false
  273. cananimate = true
  274. hitbox:Destroy()
  275. 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)
  276. end
  277. end
  278. mouse.Button1Down:connect(swing)
  279.  
  280. while true do
  281. if cananimate then
  282. --Walking animation
  283. 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
  284. for i = 0.1,0.3 , 0.008 do
  285. 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
  286. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  287. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  288. 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)
  289. 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)
  290. 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)
  291. 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)
  292. game:GetService("RunService").Stepped:wait()
  293. end
  294. end
  295. for i = 0.1,0.3 , 0.008 do
  296. 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
  297. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  298. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  299. 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)
  300. 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)
  301. 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)
  302. 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)
  303. game:GetService("RunService").Stepped:wait()
  304. end
  305. end
  306. -- Idle animation
  307. 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
  308. for i = 0,1 , 0.1 do
  309. 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
  310. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  311. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  312. 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)
  313. 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)
  314. 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)
  315. 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)
  316. game:GetService("RunService").RenderStepped:wait()
  317. end
  318. end
  319. end
  320. end
  321. wait()
  322. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement