Advertisement
DarkScriptZEditors

PUGB Pan FE

Nov 21st, 2018
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.73 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
  6. print("FE Compatibility code by Mokiros")
  7. local rp = RealPlayer
  8. script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  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. local h,t
  78. --Give the server mouse data 30 times every second, but only if the values changed
  79. --If player is not moving their mouse, client won't fire events
  80. while wait(1/30) do
  81. if h~=Mouse.Hit or t~=Mouse.Target then
  82. h,t=Mouse.Hit,Mouse.Target
  83. Event:FireServer({isMouse=true,Target=t,Hit=h})
  84. end
  85. end]==],Player.Character)
  86.  
  87. ----Sandboxed game object that allows the usage of client-side methods and services
  88. --Real game object
  89. local _rg = game
  90.  
  91. --Metatable for fake service
  92. local fsmt = {
  93. __index = function(self,k)
  94. local s = rawget(self,"_RealService")
  95. if s then
  96. return typeof(s[k])=="function"
  97. and function(_,...)return s[k](s,...)end or s[k]
  98. end
  99. end,
  100. __newindex = function(self,k,v)
  101. local s = rawget(self,"_RealService")
  102. if s then s[k]=v end
  103. end
  104. }
  105. local function FakeService(t,RealService)
  106. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  107. return setmetatable(t,fsmt)
  108. end
  109.  
  110. --Fake game object
  111. local g = {
  112. GetService = function(self,s)
  113. return rawget(self,s) or _rg:GetService(s)
  114. end,
  115. Players = FakeService({
  116. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  117. },"Players"),
  118. UserInputService = FakeService(UIS,"UserInputService"),
  119. ContextActionService = FakeService(CAS,"ContextActionService"),
  120. RunService = FakeService({
  121. _btrs = {},
  122. RenderStepped = _rg:GetService("RunService").Heartbeat,
  123. BindToRenderStep = function(self,name,_,fun)
  124. self._btrs[name] = self.Heartbeat:Connect(fun)
  125. end,
  126. UnbindFromRenderStep = function(self,name)
  127. self._btrs[name]:Disconnect()
  128. end,
  129. },"RunService")
  130. }
  131. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  132. g.service = g.GetService
  133. FakeService(g,game)
  134. --Changing owner to fake player object to support owner:GetMouse()
  135. game,owner = g,g.Players.LocalPlayer
  136. end
  137. --By Ruffles14
  138. mouse = game.Players.LocalPlayer:GetMouse()
  139. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  140. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  141. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  142. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  143. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  144. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  145. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  146. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  147. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  148. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  149. local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  150. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
  151. local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  152. humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
  153. humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
  154. local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  155. local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  156. headweld.Part0 = game.Players.LocalPlayer.Character.Torso
  157. headweld.Part1 = game.Players.LocalPlayer.Character.Head
  158. headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
  159. game.Players.LocalPlayer.Character.Torso.Neck:Remove()
  160. using = false
  161. --Converted with ttyyuu12345's model to script plugin v4
  162. function sandbox(var,func)
  163. local env = getfenv(func)
  164. local newenv = setmetatable({},{
  165. __index = function(self,k)
  166. if k=="script" then
  167. return var
  168. else
  169. return env[k]
  170. end
  171. end,
  172. })
  173. setfenv(func,newenv)
  174. return func
  175. end
  176. cors = {}
  177. mas = Instance.new("Model",game:GetService("Lighting"))
  178. Part0 = Instance.new("Part")
  179. SpecialMesh1 = Instance.new("SpecialMesh")
  180. Part0.Parent = mas
  181. Part0.Rotation = Vector3.new(-17.039999, 72.0800018, -73.7399979)
  182. Part0.Size = Vector3.new(0.48999998, 2.96999931, 1.94999981)
  183. Part0.CFrame = CFrame.new(1.99671245, 4.08856773, -0.616976917, 0.0861581191, 0.29545939, 0.95146209, -0.99592489, 0, 0.090184398, 0.0266458243, -0.955355108, 0.294255406)
  184. Part0.BottomSurface = Enum.SurfaceType.Smooth
  185. Part0.TopSurface = Enum.SurfaceType.Smooth
  186. Part0.Position = Vector3.new(1.99671245, 4.08856773, -0.616976917)
  187. Part0.Orientation = Vector3.new(-5.17000008, 72.8099976, -90)
  188. Part0.CanCollide = false
  189. SpecialMesh1.Parent = Part0
  190. SpecialMesh1.MeshId = "rbxassetid://441572308"
  191. SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
  192. SpecialMesh1.TextureId = "rbxassetid://441572332"
  193. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  194. SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
  195. for i,v in pairs(mas:GetChildren()) do
  196. v.Parent = game:GetService("Players").LocalPlayer.Character
  197. pcall(function() v:MakeJoints() end)
  198. end
  199. mas:Destroy()
  200. for i,v in pairs(cors) do
  201. spawn(function()
  202. pcall(v)
  203. end)
  204. end
  205. Part0:BreakJoints()
  206. cananimate = true
  207. canhit = false
  208. local weld = Instance.new("Weld", game.Players.LocalPlayer.Character["Right Arm"])
  209. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  210. weld.Part1 = Part0
  211. weld.C0 = CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0)
  212. for i = 0,1 , 0.03 do
  213. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
  214. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
  215. 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)
  216. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
  217. game:GetService("RunService").RenderStepped:wait()
  218. end
  219. function swing()
  220. if not using then
  221. using = true
  222. cananimate = false
  223. for i = 0,1 , 0.045 do
  224. weld.C0 = weld.C0:lerp(CFrame.new(0.958130836, -0.815908253, -0.0419664383, 0.379335552, 0.92491132, -0.0253674984, -0.913223445, 0.378668189, 0.150445476, 0.148754537, -0.0339030921, 0.988292694),i)
  225. 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)
  226. 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)
  227. 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)
  228. 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)
  229. game:GetService("RunService").RenderStepped:wait()
  230. end
  231. canhit = true
  232. for i = 0,1 , 0.08 do
  233. weld.C0 = weld.C0:lerp(CFrame.new(0.968596578, -1.15575922, 0.178524971, 0.0531506836, 0.988890588, -0.13881819, -0.988834679, 0.0327400565, -0.145376131, -0.13921617, 0.144995078, 0.979589343),i)
  234. 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)
  235. 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)
  236. 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)
  237. 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)
  238. game:GetService("RunService").RenderStepped:wait()
  239. end
  240. canhit = false
  241. using = false
  242. cananimate = true
  243. end
  244. end
  245. mouse.Button1Down:connect(swing)
  246. function hittie(part)
  247. if canhit then
  248. local humanoid = part.Parent:findFirstChildOfClass("Humanoid")
  249. if humanoid then
  250. canhit = false
  251. using = false
  252. local uptor = humanoid.Parent:findFirstChild("UpperTorso")
  253. if uptor and uptor.Parent.Name ~= game.Players.LocalPlayer.Name then
  254. humanoid.Parent:BreakJoints()
  255. while humanoid.Health >= 0.001 do
  256. game:GetService("RunService").RenderStepped:wait()
  257. end
  258. if humanoid.Parent:findFirstChild("HumanoidRootPart") then
  259. humanoid.Parent.HumanoidRootPart.CanCollide = false
  260. end
  261. local function makeballlimb(attachone, attachtwo, upperang, lowang, twist)
  262. local constraint = Instance.new("BallSocketConstraint", humanoid.Parent)
  263. constraint.Attachment0 = attachone
  264. constraint.Attachment1 = attachtwo
  265. constraint.LimitsEnabled = true
  266. constraint.TwistLimitsEnabled = true
  267. constraint.TwistLowerAngle = lowang
  268. constraint.TwistUpperAngle = upperang
  269. constraint.UpperAngle = twist
  270. end
  271. local function makehingelimb(attachone, attachtwo, upperang, lowang)
  272. local constraint = Instance.new("HingeConstraint", humanoid.Parent)
  273. constraint.Attachment0 = attachone
  274. constraint.Attachment1 = attachtwo
  275. constraint.LimitsEnabled = true
  276. constraint.LowerAngle = lowang
  277. constraint.UpperAngle = upperang
  278. end
  279. for i,v in pairs(humanoid.Parent:GetChildren()) do --scan player
  280. if v.ClassName == "Accessory" then
  281. local findhandle = v:findFirstChild("Handle") --finding handle in accesorry
  282. if findhandle then
  283. local attach = findhandle:findFirstChildOfClass("Attachment")
  284. for q,w in pairs(humanoid.Parent:GetChildren()) do --scan player
  285. if w.Name == "UpperTorso" or w.Name == "Head" then
  286. attach1 = w:findFirstChild(attach.Name) --finding attachment in head/uppertorso
  287. end
  288. end
  289. if attach and attach1 then
  290. local constraint = Instance.new("HingeConstraint", humanoid.Parent) --making fake weld
  291. constraint.Attachment0 = attach
  292. constraint.Attachment1 = attach1
  293. constraint.LimitsEnabled = true
  294. constraint.LowerAngle = 0
  295. constraint.UpperAngle = 0
  296. end
  297. end
  298. end
  299. end
  300. if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("UpperTorso") then
  301. local attachment = Instance.new("Attachment", humanoid.Parent.Head)
  302. attachment.Position = Vector3.new(0, -0.5, 0)
  303. attachment.Name = "lol"
  304. attachment.Visible = false
  305. humanoid.Parent.UpperTorso.NeckAttachment.Visible = false
  306. humanoid.Parent.UpperTorso.NeckAttachment.Position = humanoid.Parent.UpperTorso.NeckAttachment.Position + Vector3.new(0,0,0)
  307. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  308. ball.Attachment0 = humanoid.Parent.UpperTorso.NeckAttachment
  309. ball.Attachment1 = attachment
  310. ball.LimitsEnabled = true
  311. ball.TwistLimitsEnabled = true
  312. ball.UpperAngle = 40
  313. ball.Restitution = 0.5
  314. ball.TwistUpperAngle = 40
  315. ball.TwistLowerAngle = -40
  316. local collidepartofleftleg = Instance.new("Part", humanoid.Parent.UpperTorso)
  317. collidepartofleftleg.Name = "Bone"
  318. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  319. collidepartofleftleg.Transparency = 1
  320. collidepartofleftleg:BreakJoints()
  321. local weeld = Instance.new("Weld", collidepartofleftleg)
  322. weeld.Part0 = collidepartofleftleg
  323. weeld.Part1 = humanoid.Parent["Head"]
  324. if humanoid.Parent.Head:findFirstChild("Neck") then
  325. humanoid.Parent.Head.Neck:destroy()
  326. end
  327. if humanoid.Parent.Head:findFirstChild("face") then
  328. humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460"
  329. end
  330. end
  331. local LeftUpperLeg = humanoid.Parent:findFirstChild("LeftUpperLeg")
  332. local LeftLowerLeg = humanoid.Parent:findFirstChild("LeftLowerLeg")
  333. --
  334. local RightUpperLeg = humanoid.Parent:findFirstChild("RightUpperLeg")
  335. local RightLowerLeg = humanoid.Parent:findFirstChild("RightLowerLeg")
  336. --
  337. local RightUpperArm = humanoid.Parent:findFirstChild("RightUpperArm")
  338. local RightLowerArm = humanoid.Parent:findFirstChild("RightLowerArm")
  339. --
  340. local LeftUpperArm = humanoid.Parent:findFirstChild("LeftUpperArm")
  341. local LeftLowerArm = humanoid.Parent:findFirstChild("LeftLowerArm")
  342. --Foot & Hands--
  343.  
  344. local LeftFoot = humanoid.Parent:findFirstChild("LeftFoot")
  345. local RightFoot = humanoid.Parent:findFirstChild("RightFoot")
  346. --
  347. local LeftHand = humanoid.Parent:findFirstChild("LeftHand")
  348. local RightHand = humanoid.Parent:findFirstChild("RightHand")
  349.  
  350. --END--
  351. --TORSOS--
  352.  
  353. local UpperTorso = humanoid.Parent:findFirstChild("UpperTorso")
  354. local LowerTorso = humanoid.Parent:findFirstChild("LowerTorso")
  355.  
  356. --END--
  357. if LowerTorso then
  358. if LeftUpperLeg then
  359. makeballlimb(LowerTorso["LeftHipRigAttachment"], LeftUpperLeg["LeftHipRigAttachment"], 50,-50, 90)
  360. end
  361. if RightUpperLeg then
  362. makeballlimb(LowerTorso["RightHipRigAttachment"], RightUpperLeg["RightHipRigAttachment"], 50,-50, 90)
  363. end
  364. if LeftLowerLeg then
  365. makehingelimb(LeftUpperLeg["LeftKneeRigAttachment"], LeftLowerLeg["LeftKneeRigAttachment"], 0,-90)
  366. end
  367. if RightLowerLeg then
  368. makehingelimb(RightUpperLeg["RightKneeRigAttachment"], RightLowerLeg["RightKneeRigAttachment"], 0,-90)
  369. end
  370. if LeftFoot then
  371. makehingelimb(LeftLowerLeg["LeftAnkleRigAttachment"], LeftFoot["LeftAnkleRigAttachment"], 30, -30)
  372. end
  373. if RightFoot then
  374. makehingelimb(RightLowerLeg["RightAnkleRigAttachment"], RightFoot["RightAnkleRigAttachment"], 30, -30)
  375. end
  376. if UpperTorso then
  377. makehingelimb(UpperTorso["WaistRigAttachment"], LowerTorso["WaistRigAttachment"], 30, -30)
  378. end
  379. end
  380. if UpperTorso then
  381. local vel = Instance.new("BodyVelocity", UpperTorso)
  382. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  383. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10
  384. game.Debris:AddItem(vel, 0.1)
  385. local hitsound = Instance.new("Sound", UpperTorso)
  386. hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"
  387. hitsound:Play()
  388. hitsound.Volume = math.random(5,10)
  389. local canhit = true
  390. local hitval = 15
  391. local uptor = humanoid.Parent.UpperTorso
  392. if RightUpperArm then
  393. makeballlimb(RightUpperArm["RightShoulderRigAttachment"], UpperTorso["RightShoulderRigAttachment"], 90,-50, 180)
  394. end
  395. if RightLowerArm then
  396. makehingelimb(RightLowerArm["RightElbowRigAttachment"], RightUpperArm["RightElbowRigAttachment"], 0,-90)
  397. end
  398. if RightHand then
  399. makehingelimb(RightHand["RightWristRigAttachment"], RightLowerArm["RightWristRigAttachment"], 30,30)
  400. end
  401. if LeftUpperArm then
  402. makeballlimb(LeftUpperArm["LeftShoulderRigAttachment"], UpperTorso["LeftShoulderRigAttachment"], 90,-50, 180)
  403. end
  404. if LeftLowerArm then
  405. makehingelimb(LeftLowerArm["LeftElbowRigAttachment"], LeftUpperArm["LeftElbowRigAttachment"], 0,-90)
  406. end
  407. if LeftHand then
  408. makehingelimb(LeftHand["LeftWristRigAttachment"], LeftLowerArm["LeftWristRigAttachment"], 30,30)
  409. end
  410. end
  411. else
  412. humanoid.Parent.Archivable = true
  413. humanoid.PlatformStand = true
  414. local clone = humanoid.Parent:Clone()
  415. clone.Parent = workspace
  416. game.Debris:AddItem(clone, 60)
  417. for i,v in pairs(clone:GetChildren()) do
  418. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  419. v:Remove()
  420. end
  421. for i,p in pairs(v:GetChildren()) do
  422. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  423. p:Remove()
  424. end
  425. end
  426. end
  427. for i,t in pairs(humanoid.Parent:GetChildren()) do
  428. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  429. t:Remove()
  430. end
  431. end
  432. local vel = Instance.new("BodyVelocity", clone.Torso)
  433. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  434. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 15
  435. game.Debris:AddItem(vel, 0.1)
  436. local hitsound = Instance.new("Sound", clone.Torso)
  437. hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"
  438. hitsound:Play()
  439. hitsound.Volume = math.random(5,10)
  440. vel = Instance.new("BodyVelocity", clone.Torso)
  441. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  442. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  443. using = false
  444. hit = Instance.new("Sound", clone.Torso)
  445. hit.SoundId = "rbxassetid://260430060"
  446. hit.Volume = 0
  447. hit1 = Instance.new("Sound", clone.Torso)
  448. hit1.SoundId = "rbxassetid://138087186"
  449. hit1.Volume = 0
  450. hit2 = Instance.new("Sound", clone.Torso)
  451. hit2.SoundId = "rbxassetid://131237241"
  452. hit2.Volume = 0
  453. hit3 = Instance.new("Sound", clone.Torso)
  454. hit3.SoundId = "rbxassetid://278062209"
  455. hit3.Volume = 0
  456. hit3.TimePosition = 0.33
  457. ded = Instance.new("Sound", clone.Torso)
  458. ded.SoundId = "rbxassetid://418892870"
  459. ded.Volume = 0
  460. local leftarm = clone:findFirstChild("Left Arm")
  461. local rightrm = clone:findFirstChild("Right Arm")
  462. local leftleg = clone:findFirstChild("Left Leg")
  463. local rightleg = clone:findFirstChild("Right Leg")
  464. local head = clone:findFirstChild("Head")
  465. for i, g in pairs(humanoid.Parent:GetChildren()) do
  466. if g.ClassName == "Part" then
  467. g:destroy()
  468. end
  469. end
  470. for i, h in pairs(humanoid.Parent:GetChildren()) do
  471. if h.ClassName == "Accesory" then
  472. h:destroy()
  473. end
  474. end
  475. for z,x in pairs(clone:GetChildren()) do
  476. if x.ClassName == "Accessory" then
  477. local handle = x:findFirstChild("Handle")
  478. if handle then
  479. local attachment = handle:findFirstChildOfClass("Attachment")
  480. if attachment then
  481. for q,w in pairs(clone:GetChildren()) do
  482. if w.Name == "Torso" or w.Name == "Head" then
  483. local anotherone = w:findFirstChild(attachment.Name)
  484. if attachment and anotherone then
  485. local constraint = Instance.new("HingeConstraint", clone) --making fake weld
  486. constraint.Attachment0 = attachment
  487. constraint.Attachment1 = anotherone
  488. constraint.LimitsEnabled = true
  489. constraint.LowerAngle = 0
  490. constraint.UpperAngle = 0
  491. end
  492. end
  493. end
  494. end
  495. end
  496. end
  497. end
  498. if head and clone.Torso:findFirstChild("NeckAttachment") then
  499. local attachment = Instance.new("Attachment", clone.Head)
  500. attachment.Position = Vector3.new(0, -0.5, 0)
  501. attachment.Name = "lol"
  502. attachment.Visible = false
  503. clone.Torso.NeckAttachment.Visible = false
  504. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  505. local ball = Instance.new("BallSocketConstraint", clone)
  506. ball.Attachment0 = clone.Torso.NeckAttachment
  507. ball.Attachment1 = attachment
  508. ball.LimitsEnabled = true
  509. ball.TwistLimitsEnabled = true
  510. ball.UpperAngle = 90
  511. ball.Restitution = 0.5
  512. ball.TwistUpperAngle = 90
  513. ball.TwistLowerAngle = -90
  514. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  515. collidepartofleftleg.Name = "Bone"
  516. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  517. collidepartofleftleg.Transparency = 1
  518. collidepartofleftleg:BreakJoints()
  519. local weeld = Instance.new("Weld", collidepartofleftleg)
  520. weeld.Part0 = collidepartofleftleg
  521. weeld.Part1 = clone["Head"]
  522. end
  523. if leftleg ~= nil then
  524. leftleg:BreakJoints()
  525. local glue = Instance.new("Glue", clone.Torso)
  526. glue.Part0 = clone.Torso
  527. glue.Part1 = leftleg
  528. glue.Name = "Left leg"
  529. local collider = Instance.new("Part", leftleg)
  530. collider.Position = Vector3.new(0,999,0)
  531. collider.Size = Vector3.new(1.5, 1, 1)
  532. collider.Shape = "Cylinder"
  533. local weld = Instance.new("Weld", collider)
  534. weld.Part0 = leftleg
  535. weld.Part1 = collider
  536. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  537. collider.TopSurface = "Smooth"
  538. collider.BottomSurface = "Smooth"
  539. collider.formFactor = "Symmetric"
  540. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  541. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  542. collider.Transparency = 1
  543. end
  544. ------------
  545. if rightleg ~= nil then
  546. rightleg:BreakJoints()
  547. local glue1 = Instance.new("Glue", clone.Torso)
  548. glue1.Part0 = clone.Torso
  549. glue1.Part1 = rightleg
  550. glue1.Name = "Right leg"
  551. local collider1 = Instance.new("Part", rightleg)
  552. collider1.Position = Vector3.new(0,999,0)
  553. collider1.Size = Vector3.new(1.5, 1, 1)
  554. collider1.Shape = "Cylinder"
  555. local weld1 = Instance.new("Weld", collider1)
  556. weld1.Part0 = rightleg
  557. weld1.Part1 = collider1
  558. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  559. collider1.TopSurface = "Smooth"
  560. collider1.BottomSurface = "Smooth"
  561. collider1.formFactor = "Symmetric"
  562. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  563. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  564. collider1.Transparency = 1
  565. end
  566. ------------
  567. if rightrm ~= nil then
  568. rightrm:BreakJoints()
  569. rightrm.CFrame = clone.Torso.CFrame * CFrame.new(1.7,0,0)
  570. local glue11 = Instance.new("Glue", clone.Torso)
  571. glue11.Part0 = clone.Torso
  572. glue11.Part1 = rightrm
  573. glue11.Name = "Right shoulder"
  574. local collider11 = Instance.new("Part", rightrm)
  575. collider11.Position = Vector3.new(0,9999,0)
  576. collider11.Size = Vector3.new(1.5,1,1)
  577. collider11.Shape = "Cylinder"
  578. local weld11 = Instance.new("Weld", collider11)
  579. weld11.Part0 = rightrm
  580. weld11.Part1 = collider11
  581. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  582. collider11.TopSurface = "Smooth"
  583. collider11.BottomSurface = "Smooth"
  584. collider11.formFactor = "Symmetric"
  585. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  586. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  587. collider11.Transparency = 1
  588. end
  589. ------------
  590. if leftarm ~= nil then
  591. leftarm.CFrame = clone.Torso.CFrame * CFrame.new(-1.7,0,0)
  592. leftarm:BreakJoints()
  593. local glue111 = Instance.new("Glue", clone.Torso)
  594. glue111.Part0 = clone.Torso
  595. glue111.Part1 = leftarm
  596. glue111.Name = "Left shoulder"
  597. local collider111 = Instance.new("Part", leftarm)
  598. collider111.Position = Vector3.new(0,9999,0)
  599. collider111.Size = Vector3.new(1.5,1,1)
  600. collider111.Shape = "Cylinder"
  601. local weld111 = Instance.new("Weld", collider111)
  602. weld111.Part0 = leftarm
  603. weld111.Part1 = collider111
  604. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  605. collider111.TopSurface = "Smooth"
  606. collider111.BottomSurface = "Smooth"
  607. collider111.formFactor = "Symmetric"
  608. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  609. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  610. collider111.Transparency = 1
  611. ----------------
  612. sensoring = Instance.new("Part", clone.Torso)
  613. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  614. sensoring.CanCollide = false
  615. sensoring.Position = clone.Torso.Position
  616. local welder = Instance.new("Weld", sensoring)
  617. welder.Part0 = clone.Torso
  618. welder.Part1 = sensoring
  619. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  620. sensoring.Transparency = 1
  621. -----------------
  622. sensoring1 = Instance.new("Part", clone.Torso)
  623. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  624. sensoring1.CanCollide = false
  625. sensoring1.Position = clone.Torso.Position
  626. local welder1 = Instance.new("Weld", sensoring)
  627. welder1.Part0 = clone.Torso
  628. welder1.Part1 = sensoring1
  629. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  630. sensoring1.Transparency = 1
  631. end
  632. clone.Name = humanoid.Parent.Name.." (PANNED)"
  633. ded:Play()
  634. vel:destroy()
  635. wait(0.5)
  636. local function touch()
  637. if not using then
  638. using = true
  639. local Math = math.random(1,4)
  640. if Math == 1 then
  641. hit:Play()
  642. end
  643. if Math == 2 then
  644. hit1:Play()
  645. end
  646. if Math == 3 then
  647. hit2:Play()
  648. end
  649. if Math == 4 then
  650. hit3:Play()
  651. end
  652. wait(0.1)
  653. using = false
  654. end
  655. end
  656. sensoring.Touched:connect(touch)
  657. sensoring1.Touched:connect(touch)
  658. while true do
  659. if clone:findFirstChild("Head") then
  660. clone.Head.CanCollide = false
  661. end
  662. game:GetService("RunService").Stepped:wait()
  663. end
  664. end
  665. end
  666. end
  667. end
  668. Part0.Touched:connect(hittie)
  669. function ragdoll()
  670. game.Players.LocalPlayer.Character.Archivable = true
  671. clone = game.Players.LocalPlayer.Character:Clone()
  672. clone.Parent = workspace
  673. for i,v in pairs(clone:GetChildren()) do
  674. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  675. v:Remove()
  676. end
  677. for i,p in pairs(v:GetChildren()) do
  678. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  679. p:Remove()
  680. end
  681. end
  682. end
  683. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  684. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  685. t:Remove()
  686. end
  687. end
  688. vel = Instance.new("BodyVelocity", clone.Torso)
  689. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  690. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  691. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  692. using = false
  693. hit = Instance.new("Sound", clone.Torso)
  694. hit.SoundId = "rbxassetid://260430060"
  695. hit.Volume = 0
  696. hit1 = Instance.new("Sound", clone.Torso)
  697. hit1.SoundId = "rbxassetid://138087186"
  698. hit1.Volume = 0
  699. hit2 = Instance.new("Sound", clone.Torso)
  700. hit2.SoundId = "rbxassetid://131237241"
  701. hit2.Volume = 0
  702. hit3 = Instance.new("Sound", clone.Torso)
  703. hit3.SoundId = "rbxassetid://278062209"
  704. hit3.Volume = 0
  705. hit3.TimePosition = 0.33
  706. ded = Instance.new("Sound", clone.Torso)
  707. ded.SoundId = "rbxassetid://337800380"
  708. ded.Volume = 5
  709. local leftarm = clone:findFirstChild("Left Arm")
  710. local rightrm = clone:findFirstChild("Right Arm")
  711. local leftleg = clone:findFirstChild("Left Leg")
  712. local rightleg = clone:findFirstChild("Right Leg")
  713. local head = clone:findFirstChild("Head")
  714. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  715. if g.ClassName == "Part" then
  716. g:destroy()
  717. end
  718. end
  719. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  720. if h.ClassName == "Accesory" then
  721. h:destroy()
  722. end
  723. end
  724. game.Workspace.CurrentCamera.CameraSubject = head
  725. if head then
  726. local attachment = Instance.new("Attachment", clone.Head)
  727. attachment.Position = Vector3.new(0, -0.5, 0)
  728. attachment.Name = "lol"
  729. attachment.Visible = false
  730. clone.Torso.NeckAttachment.Visible = false
  731. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  732. local ball = Instance.new("BallSocketConstraint", clone)
  733. ball.Attachment0 = clone.Torso.NeckAttachment
  734. ball.Attachment1 = attachment
  735. ball.LimitsEnabled = true
  736. ball.TwistLimitsEnabled = true
  737. ball.UpperAngle = 90
  738. ball.Restitution = 0.5
  739. ball.TwistUpperAngle = 90
  740. ball.TwistLowerAngle = -90
  741. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  742. collidepartofleftleg.Name = "Bone"
  743. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  744. collidepartofleftleg.Transparency = 1
  745. collidepartofleftleg:BreakJoints()
  746. local weeld = Instance.new("Weld", collidepartofleftleg)
  747. weeld.Part0 = collidepartofleftleg
  748. weeld.Part1 = clone["Head"]
  749. end
  750. if leftleg ~= nil then
  751. local glue = Instance.new("Glue", clone.Torso)
  752. glue.Part0 = clone.Torso
  753. glue.Part1 = leftleg
  754. glue.Name = "Left leg"
  755. local collider = Instance.new("Part", leftleg)
  756. collider.Position = Vector3.new(0,999,0)
  757. collider.Size = Vector3.new(1.5, 1, 1)
  758. collider.Shape = "Cylinder"
  759. local weld = Instance.new("Weld", collider)
  760. weld.Part0 = leftleg
  761. weld.Part1 = collider
  762. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  763. collider.TopSurface = "Smooth"
  764. collider.BottomSurface = "Smooth"
  765. collider.formFactor = "Symmetric"
  766. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  767. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  768. collider.Transparency = 1
  769. end
  770. ------------
  771. if rightleg ~= nil then
  772. local glue1 = Instance.new("Glue", clone.Torso)
  773. glue1.Part0 = clone.Torso
  774. glue1.Part1 = rightleg
  775. glue1.Name = "Right leg"
  776. local collider1 = Instance.new("Part", rightleg)
  777. collider1.Position = Vector3.new(0,999,0)
  778. collider1.Size = Vector3.new(1.5, 1, 1)
  779. collider1.Shape = "Cylinder"
  780. local weld1 = Instance.new("Weld", collider1)
  781. weld1.Part0 = rightleg
  782. weld1.Part1 = collider1
  783. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  784. collider1.TopSurface = "Smooth"
  785. collider1.BottomSurface = "Smooth"
  786. collider1.formFactor = "Symmetric"
  787. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  788. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  789. collider1.Transparency = 1
  790. end
  791. ------------
  792. if rightrm ~= nil then
  793. local glue11 = Instance.new("Glue", clone.Torso)
  794. glue11.Part0 = clone.Torso
  795. glue11.Part1 = rightrm
  796. glue11.Name = "Right shoulder"
  797. local collider11 = Instance.new("Part", rightrm)
  798. collider11.Position = Vector3.new(0,9999,0)
  799. collider11.Size = Vector3.new(1.5,1,1)
  800. collider11.Shape = "Cylinder"
  801. local weld11 = Instance.new("Weld", collider11)
  802. weld11.Part0 = rightrm
  803. weld11.Part1 = collider11
  804. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  805. collider11.TopSurface = "Smooth"
  806. collider11.BottomSurface = "Smooth"
  807. collider11.formFactor = "Symmetric"
  808. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  809. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  810. collider11.Transparency = 1
  811. end
  812. ------------
  813. if leftarm ~= nil then
  814. local glue111 = Instance.new("Glue", clone.Torso)
  815. glue111.Part0 = clone.Torso
  816. glue111.Part1 = leftarm
  817. glue111.Name = "Left shoulder"
  818. local collider111 = Instance.new("Part", leftarm)
  819. collider111.Position = Vector3.new(0,9999,0)
  820. collider111.Size = Vector3.new(1.5,1,1)
  821. collider111.Shape = "Cylinder"
  822. local weld111 = Instance.new("Weld", collider111)
  823. weld111.Part0 = leftarm
  824. weld111.Part1 = collider111
  825. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  826. collider111.TopSurface = "Smooth"
  827. collider111.BottomSurface = "Smooth"
  828. collider111.formFactor = "Symmetric"
  829. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  830. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  831. collider111.Transparency = 1
  832. ----------------
  833. sensoring = Instance.new("Part", clone.Torso)
  834. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  835. sensoring.CanCollide = false
  836. sensoring.Position = clone.Torso.Position
  837. local welder = Instance.new("Weld", sensoring)
  838. welder.Part0 = clone.Torso
  839. welder.Part1 = sensoring
  840. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  841. sensoring.Transparency = 1
  842. -----------------
  843. sensoring1 = Instance.new("Part", clone.Torso)
  844. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  845. sensoring1.CanCollide = false
  846. sensoring1.Position = clone.Torso.Position
  847. local welder1 = Instance.new("Weld", sensoring)
  848. welder1.Part0 = clone.Torso
  849. welder1.Part1 = sensoring1
  850. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  851. sensoring1.Transparency = 1
  852. end
  853. clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)"
  854. ded:Play()
  855. vel:destroy()
  856. wait(0.2)
  857. game.Debris:AddItem(clone,60)
  858. local function touch()
  859. if not using then
  860. using = true
  861. local Math = math.random(1,4)
  862. if Math == 1 then
  863. hit:Play()
  864. end
  865. if Math == 2 then
  866. hit1:Play()
  867. end
  868. if Math == 3 then
  869. hit2:Play()
  870. end
  871. if Math == 4 then
  872. hit3:Play()
  873. end
  874. wait(0.1)
  875. using = false
  876. end
  877. end
  878. sensoring.Touched:connect(touch)
  879. sensoring1.Touched:connect(touch)
  880. while true do
  881. clone.Head.CanCollide = false
  882. game:GetService("RunService").Stepped:wait()
  883. end
  884. end
  885.  
  886. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  887.  
  888. --di ent
  889. while true do
  890. if cananimate then
  891. 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
  892. for i = 0.1,0.3 , 0.008 do
  893. 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
  894. 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)
  895. 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)
  896. game:GetService("RunService").Stepped:wait()
  897. end
  898. end
  899. for i = 0.1,0.3 , 0.008 do
  900. 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
  901. 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)
  902. 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)
  903. game:GetService("RunService").Stepped:wait()
  904. end
  905. end
  906. 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
  907. for i = 0,1 , 0.1 do
  908. 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
  909. weld.C0 = weld.C0:lerp(CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0),i)
  910. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
  911. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
  912. 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)
  913. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
  914. game:GetService("RunService").RenderStepped:wait()
  915. end
  916. end
  917. end
  918. end
  919. wait()
  920. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement