Advertisement
HoneyBadger69

Untitled

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