MaxNutellaOML

look at things

Aug 17th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.87 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141.  
  142.  
  143. --Converted with ttyyuu12345's model to script plugin v4
  144. function sandbox(var,func)
  145. local env = getfenv(func)
  146. local newenv = setmetatable({},{
  147. __index = function(self,k)
  148. if k=="script" then
  149. return var
  150. else
  151. return env[k]
  152. end
  153. end,
  154. })
  155. setfenv(func,newenv)
  156. return func
  157. end
  158. cors = {}
  159. mas = Instance.new("Model",game:GetService("Lighting"))
  160. Tool0 = Instance.new("Tool")
  161. Part1 = Instance.new("Part")
  162. Sound2 = Instance.new("Sound")
  163. Sound3 = Instance.new("Sound")
  164. Sound4 = Instance.new("Sound")
  165. Sound5 = Instance.new("Sound")
  166. Sound6 = Instance.new("Sound")
  167. Sound7 = Instance.new("Sound")
  168. Sound8 = Instance.new("Sound")
  169. Sound9 = Instance.new("Sound")
  170. SpecialMesh10 = Instance.new("SpecialMesh")
  171. Sound11 = Instance.new("Sound")
  172. RemoteEvent12 = Instance.new("RemoteEvent")
  173. LocalScript13 = Instance.new("LocalScript")
  174. Script14 = Instance.new("Script")
  175. Camera15 = Instance.new("Camera")
  176. Tool0.Name = "Pistol"
  177. Tool0.Parent = mas
  178. Tool0.TextureId = "rbxassetid://168510890"
  179. Tool0.Grip = CFrame.new(0.014765705, -0.0876774788, 0.452041, 0.999586999, 0, 0.02873604, 0, 1, 0, -0.02873604, 0, 0.999586999)
  180. Tool0.GripForward = Vector3.new(-0.02873604, -0, -0.999586999)
  181. Tool0.GripPos = Vector3.new(0.014765705, -0.0876774788, 0.452041)
  182. Tool0.GripRight = Vector3.new(0.999586999, 0, -0.02873604)
  183. Tool0.ToolTip = "Gun to kill skids."
  184. Part1.Name = "Handle"
  185. Part1.Parent = Tool0
  186. Part1.CFrame = CFrame.new(1.841434, 0.946837008, -16.1359825, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872)
  187. Part1.Orientation = Vector3.new(-15, 0, 0)
  188. Part1.Position = Vector3.new(1.841434, 0.946837008, -16.1359825)
  189. Part1.Rotation = Vector3.new(-15, 0, 0)
  190. Part1.Size = Vector3.new(0.230000198, 0.0500000007, 0.290000528)
  191. Part1.BottomSurface = Enum.SurfaceType.Smooth
  192. Part1.TopSurface = Enum.SurfaceType.Smooth
  193. Sound2.Name = "shatter"
  194. Sound2.Parent = Part1
  195. Sound2.Pitch = 2
  196. Sound2.PlaybackSpeed = 2
  197. Sound2.SoundId = "rbxassetid://2978605361"
  198. Sound3.Name = "empty"
  199. Sound3.Parent = Part1
  200. Sound3.Volume = 4
  201. Sound4.Name = "equip"
  202. Sound4.Parent = Part1
  203. Sound4.SoundId = "rbxassetid://628897044"
  204. Sound5.Name = "unequip"
  205. Sound5.Parent = Part1
  206. Sound5.SoundId = "rbxassetid://663514083"
  207. Sound6.Name = "supersonic bullet crack"
  208. Sound6.Parent = Part1
  209. Sound6.EmitterSize = 1
  210. Sound6.MinDistance = 1
  211. Sound6.Pitch = 1.5
  212. Sound6.PlaybackSpeed = 1.5
  213. Sound6.SoundId = "rbxassetid://259586543"
  214. Sound6.Volume = 1
  215. Sound7.Name = "bullethitflesh"
  216. Sound7.Parent = Part1
  217. Sound7.SoundId = "rbxassetid://3092866899"
  218. Sound8.Name = "bullethit"
  219. Sound8.Parent = Part1
  220. Sound8.SoundId = "rbxassetid://1489924400"
  221. Sound9.Name = "boom"
  222. Sound9.Parent = Part1
  223. Sound9.SoundId = "rbxassetid://2898512514"
  224. Sound9.Volume = 10
  225. SpecialMesh10.Parent = Part1
  226. SpecialMesh10.MeshId = "http://www.roblox.com/asset/?id=19999257"
  227. SpecialMesh10.Scale = Vector3.new(0.99000001, 0.899999976, 0.949999988)
  228. SpecialMesh10.TextureId = "http://www.roblox.com/asset/?id=205502594"
  229. SpecialMesh10.MeshType = Enum.MeshType.FileMesh
  230. Sound11.Name = "gunshot"
  231. Sound11.Parent = Part1
  232. Sound11.SoundId = "rbxassetid://663514083"
  233. RemoteEvent12.Name = "GunEvent"
  234. RemoteEvent12.Parent = Tool0
  235. LocalScript13.Name = "ShootLocal"
  236. LocalScript13.Parent = Tool0
  237. table.insert(cors,sandbox(LocalScript13,function()
  238. --By Rufus14
  239. tool = script.Parent
  240. playermouse = game:GetService("Players").LocalPlayer:GetMouse()
  241. runservice = game:GetService("RunService").RenderStepped
  242. gunevent = tool.GunEvent
  243. function onpress()
  244. gunevent:FireServer("shoot", playermouse.Hit.p, playermouse.Origin.p)
  245. end
  246. tool.Activated:connect(onpress)
  247. function removearms()
  248. if game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("RightArmWeld") then
  249. game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("RightArmWeld"):destroy()
  250. end
  251. if game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("HeadWeld") then
  252. game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("HeadWeld"):destroy()
  253. end
  254. if game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("LeftArmWeld") then
  255. game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("LeftArmWeld"):destroy()
  256. end
  257. if game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld") then
  258. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld"):destroy()
  259. end
  260. end
  261. tool.Unequipped:connect(removearms)
  262. while runservice:wait() do
  263. if tool.Parent == game:GetService("Players").LocalPlayer.Character then
  264. if (workspace.CurrentCamera.CFrame.p - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude < 1.3 then
  265. if game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld") then
  266. gunevent:FireServer("point", playermouse.Hit.p, playermouse.Origin.p)
  267. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.HumanoidRootPartWeld.C0 = CFrame.fromEulerAnglesXYZ(0,math.pi/3,0)
  268. else
  269. local humanoidrootpart = Instance.new("Weld", game:GetService("Players").LocalPlayer.Character.HumanoidRootPart)
  270. humanoidrootpart.Part0 = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart
  271. humanoidrootpart.Part1 = game:GetService("Players").LocalPlayer.Character.Torso
  272. humanoidrootpart.Name = "HumanoidRootPartWeld"
  273. end
  274. else
  275. if game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld") then
  276. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld"):destroy()
  277. end
  278. gunevent:FireServer("point", playermouse.Hit.p, playermouse.Origin.p)
  279. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(playermouse.Hit.p.x,game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.y,playermouse.Hit.p.z)) * CFrame.fromEulerAnglesXYZ(0,math.pi/3,0)
  280. end
  281. end
  282. end
  283. end))
  284. Script14.Name = "ShootScript"
  285. Script14.Parent = Tool0
  286. table.insert(cors,sandbox(Script14,function()
  287. --By Rufus14
  288. canuse = true
  289. heartbeat = game:GetService("RunService").Heartbeat
  290. tool = script.Parent
  291. handle = tool.Handle
  292. shoot = handle.gunshot
  293. shattersound = handle.shatter
  294. empty = handle.empty
  295. shootevent = tool.GunEvent
  296. boom = handle.boom
  297. equip = handle.equip
  298. unequip = handle.unequip
  299. bullethitflesh = handle.bullethitflesh
  300. bullethit = handle.bullethit
  301. bulletcrack = handle["supersonic bullet crack"]
  302. function positiongun()
  303. equip:Play()
  304. unequip:Play()
  305. wait(6)
  306. boom:Play()
  307. local ex = Instance.new("Explosion",workspace)
  308. ex.Position = handle.Position
  309. ex.BlastRadius = 30
  310. ex.BlastPressure = 500
  311. end
  312. function resetgun()
  313. wait(9)
  314. boom:Play()
  315. local ex = Instance.new("Explosion",workspace)
  316. ex.Position = handle.Position
  317. ex.BlastRadius = 50
  318. ex.BlastPressure = 9e9
  319. handle:destroy()
  320. end
  321. tool.Unequipped:connect(resetgun)
  322. tool.Equipped:connect(positiongun)
  323.  
  324. function dosomething(plr, whataction, pos, origin)
  325. if whataction == "shoot" then
  326. if canuse then
  327. canuse = false
  328. for i = 1,10 do
  329. plr.Character.Torso:findFirstChild("RightArmWeld").C1 = plr.Character.Torso:findFirstChild("RightArmWeld").C1 * CFrame.fromEulerAnglesXYZ(-0.055,0,0)
  330. end
  331. boom:Play()
  332. local ex = Instance.new("Explosion",handle)
  333. ex.Position = handle.Position
  334. ex.BlastRadius = 50
  335. ex.BlastPressure = 9e9
  336. local light = Instance.new("PointLight", handle)
  337. light.Brightness = 10
  338. local ray = Ray.new(handle.Position, (pos - handle.Position).unit * 400)
  339. local hit, position = workspace:FindPartOnRayWithIgnoreList(ray, {handle, tool.Parent["Right Arm"]})
  340. local part = Instance.new("Part", handle)
  341. part.Anchored = true
  342. part.CanCollide = false
  343. part.Material = "Neon"
  344. part.Size = Vector3.new(0,0,(handle.Position - position).magnitude/4)
  345. part.CFrame = CFrame.new(handle.Position, position) * CFrame.new(0,0,-(handle.Position - position).magnitude/2)
  346. local function hide()
  347. bulletcrack.Parent = part
  348. bulletcrack:Play()
  349. bulletcrack.MaxDistance = part.Size.z
  350. wait(0.01)
  351. part.Transparency = 1
  352. wait(bulletcrack.TimeLength - 0.01)
  353. bulletcrack.Parent = handle
  354. part:destroy()
  355. end
  356. spawn(hide)
  357. game.Debris:AddItem(light, 0.04)
  358. local function makewound(hitt)
  359. local ball = Instance.new("Part", hitt.Parent)
  360. ball.Shape = "Ball"
  361. ball.Name = "ouchwound"
  362. ball.Transparency = hitt.Transparency
  363. ball.CanCollide = false
  364. ball.Size = Vector3.new(0.25,0.25,0.25)
  365. ball.CFrame = CFrame.new(position.x,position.y,position.z)
  366. local hitweld = Instance.new("Weld", hitt)
  367. ball.CFrame = CFrame.new(ball.Position, handle.Position)
  368. hitweld.C0 = hitt.CFrame:toObjectSpace(ball.CFrame)
  369. hitweld.Part0 = hitt
  370. hitweld.Part1 = ball
  371. hitweld.Name = "ouch_weld"
  372. hitweld.C0 = hitweld.C0 * CFrame.new(0,0,0.1)
  373. bullethit.Parent = ball
  374. if hitt.Name == "ouchwound" then
  375. ball.Transparency = 1
  376. local function waittoremove()
  377. wait(3)
  378. ball:destroy()
  379. end
  380. spawn(waittoremove)
  381. end
  382. bullethit:Play()
  383. bullethit.MaxDistance = 10
  384. if hitt.Parent:findFirstChildOfClass("Humanoid") then
  385. bullethitflesh.Parent = ball
  386. bullethitflesh:Play()
  387. bullethitflesh.MaxDistance = 10
  388. local randomdamage = math.random(40,80)
  389. if hitt.Parent:findFirstChildOfClass("Humanoid").Health > 500 then
  390. hitt.Parent:findFirstChildOfClass("Humanoid").MaxHealth = 500
  391. hitt.Parent:findFirstChildOfClass("Humanoid").Health = 500
  392. end
  393. if hitt.Parent:findFirstChildOfClass("Humanoid").Health <= randomdamage then
  394. local velocity = Instance.new("BodyVelocity", hit)
  395. velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  396. velocity.Velocity = handle.CFrame.lookVector * -math.random(15,25)
  397. game.Debris:AddItem(velocity, 0.1)
  398. hitt.Parent:findFirstChildOfClass("Humanoid").Health = 0
  399. local function searchforweld(wot)
  400. for i,v in pairs(wot:GetChildren()) do
  401. searchforweld(v)
  402. if v.ClassName == "Weld" or v.ClassName == "Motor6D" and v.Name ~= "ouch_weld" then
  403. v:destroy()
  404. end
  405. end
  406. end
  407. searchforweld(hitt.Parent)
  408. ragdollkill(hitt.Parent)
  409. else
  410. if hitt.Name ~= "Head" then
  411. hitt.Parent:findFirstChildOfClass("Humanoid").Health = hitt.Parent:findFirstChildOfClass("Humanoid").Health - randomdamage
  412. local velocity = Instance.new("BodyVelocity", hit)
  413. velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  414. velocity.Velocity = handle.CFrame.lookVector * -math.random(15,25)
  415. game.Debris:AddItem(velocity, 0.1)
  416. else
  417. hitt.Parent:findFirstChildOfClass("Humanoid").Health = 0
  418. local function searchforweld(wot)
  419. for i,v in pairs(wot:GetChildren()) do
  420. searchforweld(v)
  421. if v.ClassName == "Weld" or v.ClassName == "Motor6D" and v.Name ~= "ouch_weld" then
  422. v:destroy()
  423. end
  424. end
  425. end
  426. searchforweld(hitt.Parent)
  427. ragdollkill(hitt.Parent)
  428. end
  429. end
  430. local function bbb()
  431. wait(bullethitflesh.TimeLength)
  432. bullethitflesh.Parent = handle
  433. end
  434. spawn(bbb)
  435. ball.BrickColor = BrickColor.new("Maroon")
  436. ball.Material = "Pebble"
  437. else
  438. if not hitt.Parent:findFirstChildOfClass("Humanoid") and hitt.Parent.ClassName == "Model" then
  439. hitt:BreakJoints()
  440. local velocity = Instance.new("BodyVelocity", hitt)
  441. velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  442. velocity.Velocity = handle.CFrame.lookVector * -math.random(10,30)
  443. local function cancollide()
  444. wait(0.1)
  445. hitt.CanCollide = true
  446. velocity:destroy()
  447. end
  448. spawn(cancollide)
  449. end
  450. ball.BrickColor = hitt.BrickColor
  451. ball.Material = "Cobblestone"
  452. local function fadeaway()
  453. wait(20)
  454. for i = 1,100 do
  455. ball.Transparency = ball.Transparency + 0.01
  456. wait()
  457. end
  458. ball:destroy()
  459. end
  460. end
  461. local function aaa()
  462. wait(bullethit.TimeLength)
  463. bullethit.Parent = handle
  464. end
  465. spawn(aaa)
  466. end
  467. if hit ~= nil then
  468. if hit.Parent ~= nil then
  469. if not hit.Parent:findFirstChildOfClass("Humanoid") and not hit:findFirstChild("shattered") and hit.Name ~= "HumanoidRootPart" and hit.Transparency > 0.1 or hit.Material == "Glass" then
  470. if hit.Size.z < hit.Size.x then
  471. if hit.Size.z < 1.5 then
  472. local sha = Instance.new("BoolValue", hit)
  473. sha.Name = "shattered"
  474. local shatter = Instance.new("Part", workspace)
  475. shatter.Transparency = hit.Transparency
  476. shatter.Material = hit.Material
  477. shatter.BrickColor = hit.BrickColor
  478. shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
  479. shatter.CanCollide = hit.CanCollide
  480. shatter.CFrame = hit.CFrame * CFrame.new(shatter.Size.x/2,shatter.Size.y/2,0)
  481. shatter:BreakJoints()
  482. shatter.Velocity = handle.CFrame.lookVector * -20
  483. game.Debris:AddItem(shatter, 15)
  484. --
  485. local shatter = Instance.new("Part", workspace)
  486. shatter.Transparency = hit.Transparency
  487. shatter.Material = hit.Material
  488. shatter.BrickColor = hit.BrickColor
  489. shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
  490. shatter.CanCollide = hit.CanCollide
  491. shatter.CFrame = hit.CFrame * CFrame.new(-shatter.Size.x/2,shatter.Size.y/2,0)
  492. shatter:BreakJoints()
  493. shatter.Velocity = handle.CFrame.lookVector * -20
  494. game.Debris:AddItem(shatter, 15)
  495. --
  496. local shatter = Instance.new("Part", workspace)
  497. shatter.Transparency = hit.Transparency
  498. shatter.Material = hit.Material
  499. shatter.BrickColor = hit.BrickColor
  500. shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
  501. shatter.CanCollide = hit.CanCollide
  502. shatter.CFrame = hit.CFrame * CFrame.new(shatter.Size.x/2,-shatter.Size.y/2,0)
  503. shatter:BreakJoints()
  504. shatter.Velocity = handle.CFrame.lookVector * -20
  505. game.Debris:AddItem(shatter, 15)
  506. --
  507. local shatter = Instance.new("Part", workspace)
  508. shatter.Transparency = hit.Transparency
  509. shatter.Material = hit.Material
  510. shatter.BrickColor = hit.BrickColor
  511. shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
  512. shatter.CanCollide = hit.CanCollide
  513. shatter.CFrame = hit.CFrame * CFrame.new(-shatter.Size.x/2,-shatter.Size.y/2,0)
  514. shatter:BreakJoints()
  515. shatter.Velocity = handle.CFrame.lookVector * -20
  516. game.Debris:AddItem(shatter, 15)
  517. --
  518. hit.Anchored = true
  519. hit.Transparency = 1
  520. hit.CanCollide = false
  521. local function stopshattering()
  522. shattersound.Parent = hit
  523. shattersound:Play()
  524. shattersound.MaxDistance = 30
  525. wait(shattersound.TimeLength/2)
  526. shattersound.Parent = handle
  527. hit:destroy()
  528. end
  529. spawn(stopshattering)
  530. end
  531. elseif hit.Size.x < hit.Size.z then
  532. if hit.Size.x < 1.5 then
  533. local sha = Instance.new("BoolValue", hit)
  534. sha.Name = "shattered"
  535. local shatter = Instance.new("Part", workspace)
  536. shatter.Transparency = hit.Transparency
  537. shatter.Material = hit.Material
  538. shatter.BrickColor = hit.BrickColor
  539. shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
  540. shatter.CanCollide = hit.CanCollide
  541. shatter.CFrame = hit.CFrame * CFrame.new(0,shatter.Size.y/2,shatter.Size.z/2)
  542. shatter:BreakJoints()
  543. shatter.Velocity = handle.CFrame.lookVector * -20
  544. game.Debris:AddItem(shatter, 15)
  545. --
  546. local shatter = Instance.new("Part", workspace)
  547. shatter.Transparency = hit.Transparency
  548. shatter.Material = hit.Material
  549. shatter.BrickColor = hit.BrickColor
  550. shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
  551. shatter:BreakJoints()
  552. shatter.CanCollide = hit.CanCollide
  553. shatter.CFrame = hit.CFrame * CFrame.new(0,-shatter.Size.y/2,shatter.Size.z/2)
  554. shatter.Velocity = handle.CFrame.lookVector * -20
  555. game.Debris:AddItem(shatter, 15)
  556. --
  557. local shatter = Instance.new("Part", workspace)
  558. shatter.Transparency = hit.Transparency
  559. shatter.Material = hit.Material
  560. shatter.BrickColor = hit.BrickColor
  561. shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
  562. shatter.CanCollide = hit.CanCollide
  563. shatter.CFrame = hit.CFrame * CFrame.new(0,shatter.Size.y/2,-shatter.Size.z/2)
  564. shatter:BreakJoints()
  565. shatter.Velocity = handle.CFrame.lookVector * -20
  566. game.Debris:AddItem(shatter, 15)
  567. --
  568. local shatter = Instance.new("Part", workspace)
  569. shatter.Transparency = hit.Transparency
  570. shatter.Material = hit.Material
  571. shatter.BrickColor = hit.BrickColor
  572. shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
  573. shatter.CanCollide = hit.CanCollide
  574. shatter.CFrame = hit.CFrame * CFrame.new(0,-shatter.Size.y/2,-shatter.Size.z/2)
  575. shatter:BreakJoints()
  576. shatter.Velocity = handle.CFrame.lookVector * -20
  577. game.Debris:AddItem(shatter, 15)
  578. --
  579. hit.Anchored = true
  580. hit.Transparency = 1
  581. hit.CanCollide = false
  582. local function stopshattering()
  583. shattersound.Parent = hit
  584. shattersound:Play()
  585. shattersound.MaxDistance = 30
  586. wait(shattersound.TimeLength/2)
  587. shattersound.Parent = handle
  588. hit:destroy()
  589. end
  590. spawn(stopshattering)
  591. end
  592. end
  593. end
  594. end
  595. if hit.Parent.ClassName == "Accessory" or hit.Parent.ClassName == "Hat" then
  596. for i,v in pairs(hit:GetChildren()) do
  597. if v.ClassName == "Attachment" or v.ClassName == "Weld" or v.ClassName == "Motor6D" then
  598. v:destroy()
  599. end
  600. end
  601. hit.Parent.Parent = workspace
  602. hit.CanCollide = false
  603. local velocity = Instance.new("BodyVelocity", hit)
  604. velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  605. velocity.Velocity = handle.CFrame.lookVector * -math.random(10,30)
  606. local function cancollide()
  607. wait(0.1)
  608. hit.CanCollide = true
  609. velocity:destroy()
  610. end
  611. spawn(cancollide)
  612. else
  613. makewound(hit)
  614. end
  615. end
  616. for i = 1,10 do
  617. if plr.Character.Torso:findFirstChild("RightArmWeld") then
  618. plr.Character.Torso:findFirstChild("RightArmWeld").C1 = plr.Character.Torso:findFirstChild("RightArmWeld").C1 * CFrame.fromEulerAnglesXYZ(0.055,0,0)
  619. heartbeat:wait()
  620. end
  621. end
  622. canuse = true
  623. end
  624. elseif whataction == "point" then
  625. if plr.Character:findFirstChild("Torso") then
  626. if not plr.Character.Torso:findFirstChild("HeadWeld") then
  627. local head = Instance.new("Weld", plr.Character.Torso)
  628. head.Part0 = plr.Character.Torso
  629. head.Part1 = plr.Character.Head
  630. head.C0 = CFrame.new(0,1.5,0)
  631. head.C1 = CFrame.new(0,-0.5,0)
  632. head.Name = "HeadWeld"
  633. end
  634. if not plr.Character.Torso:findFirstChild("RightArmWeld") then
  635. local rightarm = Instance.new("Weld", plr.Character.Torso)
  636. rightarm.Part0 = plr.Character.Torso
  637. rightarm.Part1 = plr.Character["Right Arm"]
  638. rightarm.C0 = CFrame.new(1.5,0,0)
  639. rightarm.C1 = CFrame.new(0,0.5,0)
  640. rightarm.Name = "RightArmWeld"
  641. end
  642. if not plr.Character.Torso:findFirstChild("LeftArmWeld") then
  643. local leftarm = Instance.new("Weld", plr.Character.Torso)
  644. leftarm.Part0 = plr.Character.Torso
  645. leftarm.Part1 = plr.Character["Left Arm"]
  646. leftarm.C0 = CFrame.new(-1.5,0,0)
  647. leftarm.C1 = CFrame.new(0,0.5,0)
  648. leftarm.Name = "LeftArmWeld"
  649. end
  650. if plr.Character.Torso:findFirstChild("RightArmWeld") then
  651. plr.Character.Torso:findFirstChild("RightArmWeld").C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,math.pi/3) * CFrame.fromEulerAnglesXYZ(math.asin((pos-origin).unit.y),0,0)
  652. end
  653. if plr.Character.Torso:findFirstChild("HeadWeld") then
  654. plr.Character.Torso:findFirstChild("HeadWeld").C0 = CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(math.asin((pos-origin).unit.y),-math.pi/3,0)
  655. end
  656. if plr.Character.Torso:findFirstChild("LeftArmWeld") then
  657. plr.Character.Torso:findFirstChild("LeftArmWeld").C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.asin((pos-origin).unit.y)/2,0,0)
  658. end
  659. end
  660. end
  661. end
  662. shootevent.OnServerEvent:connect(dosomething)
  663. function ragdollkill(character)
  664. local victimshumanoid = character:findFirstChildOfClass("Humanoid")
  665. if not character:findFirstChild("UpperTorso") then
  666. character.Archivable = true
  667. for i,v in pairs(character:GetChildren()) do
  668. if v.ClassName == "Sound" then
  669. v:remove()
  670. end
  671. for q,w in pairs(v:GetChildren()) do
  672. if w.ClassName == "Sound" then
  673. w:remove()
  674. end
  675. end
  676. end
  677. local ragdoll = character:Clone()
  678. ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  679. if ragdoll:findFirstChild("Health") then
  680. if ragdoll:findFirstChild("Health").ClassName == "Script" then
  681. ragdoll:findFirstChild("Health").Disabled = true
  682. end
  683. end
  684. for i,v in pairs(character:GetChildren()) do
  685. if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
  686. v:destroy()
  687. end
  688. end
  689. for i,v in pairs(character:GetChildren()) do
  690. if v.ClassName == "Accessory" then
  691. local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  692. if attachment1 then
  693. for q,w in pairs(character:GetChildren()) do
  694. if w.ClassName == "Part" then
  695. local attachment2 = w:findFirstChild(attachment1.Name)
  696. if attachment2 then
  697. local hinge = Instance.new("HingeConstraint", v.Handle)
  698. hinge.Attachment0 = attachment1
  699. hinge.Attachment1 = attachment2
  700. hinge.LimitsEnabled = true
  701. hinge.LowerAngle = 0
  702. hinge.UpperAngle = 0
  703. end
  704. end
  705. end
  706. end
  707. end
  708. end
  709. ragdoll.Parent = workspace
  710. if ragdoll:findFirstChild("Right Arm") then
  711. local glue = Instance.new("Glue", ragdoll.Torso)
  712. glue.Part0 = ragdoll.Torso
  713. glue.Part1 = ragdoll:findFirstChild("Right Arm")
  714. glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  715. glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  716. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  717. limbcollider.Size = Vector3.new(1.4,1,1)
  718. limbcollider.Shape = "Cylinder"
  719. limbcollider.Transparency = 1
  720. limbcollider.Name = "LimbCollider"
  721. local limbcolliderweld = Instance.new("Weld", limbcollider)
  722. limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  723. limbcolliderweld.Part1 = limbcollider
  724. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  725. end
  726. if ragdoll:findFirstChild("Left Arm") then
  727. local glue = Instance.new("Glue", ragdoll.Torso)
  728. glue.Part0 = ragdoll.Torso
  729. glue.Part1 = ragdoll:findFirstChild("Left Arm")
  730. glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  731. glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  732. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  733. limbcollider.Size = Vector3.new(1.4,1,1)
  734. limbcollider.Shape = "Cylinder"
  735. limbcollider.Name = "LimbCollider"
  736. limbcollider.Transparency = 1
  737. local limbcolliderweld = Instance.new("Weld", limbcollider)
  738. limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
  739. limbcolliderweld.Part1 = limbcollider
  740. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  741. end
  742. if ragdoll:findFirstChild("Left Leg") then
  743. local glue = Instance.new("Glue", ragdoll.Torso)
  744. glue.Part0 = ragdoll.Torso
  745. glue.Part1 = ragdoll:findFirstChild("Left Leg")
  746. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  747. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  748. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  749. limbcollider.Size = Vector3.new(1.4,1,1)
  750. limbcollider.Shape = "Cylinder"
  751. limbcollider.Name = "LimbCollider"
  752. limbcollider.Transparency = 1
  753. local limbcolliderweld = Instance.new("Weld", limbcollider)
  754. limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  755. limbcolliderweld.Part1 = limbcollider
  756. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  757. end
  758. if ragdoll:findFirstChild("Right Leg") then
  759. local glue = Instance.new("Glue", ragdoll.Torso)
  760. glue.Part0 = ragdoll.Torso
  761. glue.Part1 = ragdoll:findFirstChild("Right Leg")
  762. glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  763. glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  764. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  765. limbcollider.Size = Vector3.new(1.4,1,1)
  766. limbcollider.Shape = "Cylinder"
  767. limbcollider.Name = "LimbCollider"
  768. limbcollider.Transparency = 1
  769. local limbcolliderweld = Instance.new("Weld", limbcollider)
  770. limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  771. limbcolliderweld.Part1 = limbcollider
  772. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  773. end
  774. if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
  775. local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
  776. HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  777. local connection = Instance.new('HingeConstraint', ragdoll["Head"])
  778. connection.LimitsEnabled = true
  779. connection.Attachment0 = ragdoll.Torso.NeckAttachment
  780. connection.Attachment1 = HeadAttachment
  781. connection.UpperAngle = 60
  782. connection.LowerAngle = -60
  783. elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
  784. local hedweld = Instance.new("Weld", ragdoll.Torso)
  785. hedweld.Part0 = ragdoll.Torso
  786. hedweld.Part1 = ragdoll.Head
  787. hedweld.C0 = CFrame.new(0,1.5,0)
  788. end
  789. game.Debris:AddItem(ragdoll, 30)
  790. local function aaaalol()
  791. wait(0.2)
  792. local function searchforvelocity(wot)
  793. for i,v in pairs(wot:GetChildren()) do
  794. searchforvelocity(v)
  795. if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  796. v:destroy()
  797. end
  798. end
  799. end
  800. searchforvelocity(ragdoll)
  801. wait(0.5)
  802. if ragdoll:findFirstChildOfClass("Humanoid") then
  803. ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  804. end
  805. if ragdoll:findFirstChild("HumanoidRootPart") then
  806. ragdoll:findFirstChild("HumanoidRootPart"):destroy()
  807. end
  808. end
  809. spawn(aaaalol)
  810. elseif character:findFirstChild("UpperTorso") then
  811. character.Archivable = true
  812. for i,v in pairs(character:GetChildren()) do
  813. if v.ClassName == "Sound" then
  814. v:remove()
  815. end
  816. for q,w in pairs(v:GetChildren()) do
  817. if w.ClassName == "Sound" then
  818. w:remove()
  819. end
  820. end
  821. end
  822. local ragdoll = character:Clone()
  823. ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  824. if ragdoll:findFirstChild("Health") then
  825. if ragdoll:findFirstChild("Health").ClassName == "Script" then
  826. ragdoll:findFirstChild("Health").Disabled = true
  827. end
  828. end
  829. for i,v in pairs(character:GetChildren()) do
  830. if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
  831. v:destroy()
  832. end
  833. end
  834. for i,v in pairs(character:GetChildren()) do
  835. if v.ClassName == "Accessory" then
  836. local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  837. if attachment1 then
  838. for q,w in pairs(character:GetChildren()) do
  839. if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  840. local attachment2 = w:findFirstChild(attachment1.Name)
  841. if attachment2 then
  842. local hinge = Instance.new("HingeConstraint", v.Handle)
  843. hinge.Attachment0 = attachment1
  844. hinge.Attachment1 = attachment2
  845. hinge.LimitsEnabled = true
  846. hinge.LowerAngle = 0
  847. hinge.UpperAngle = 0
  848. end
  849. end
  850. end
  851. end
  852. end
  853. end
  854. ragdoll.Parent = workspace
  855. local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
  856. Humanoid.PlatformStand = true
  857. local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
  858. local connection = Instance.new('BallSocketConstraint', limb)
  859. connection.LimitsEnabled = true
  860. connection.Attachment0 = attachementone
  861. connection.Attachment1 = attachmenttwo
  862. connection.TwistLimitsEnabled = true
  863. connection.TwistLowerAngle = twistlower
  864. connection.TwistUpperAngle = twistupper
  865. local limbcollider = Instance.new("Part", limb)
  866. limbcollider.Size = Vector3.new(0.1,1,1)
  867. limbcollider.Shape = "Cylinder"
  868. limbcollider.Transparency = 1
  869. limbcollider:BreakJoints()
  870. local limbcolliderweld = Instance.new("Weld", limbcollider)
  871. limbcolliderweld.Part0 = limb
  872. limbcolliderweld.Part1 = limbcollider
  873. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  874. end
  875. local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
  876. local connection = Instance.new('HingeConstraint', limb)
  877. connection.LimitsEnabled = true
  878. connection.Attachment0 = attachementone
  879. connection.Attachment1 = attachmenttwo
  880. connection.LimitsEnabled = true
  881. connection.LowerAngle = lower
  882. connection.UpperAngle = upper
  883. local limbcollider = Instance.new("Part", limb)
  884. limbcollider.Size = Vector3.new(0.1,1,1)
  885. limbcollider.Shape = "Cylinder"
  886. limbcollider.Transparency = 1
  887. limbcollider:BreakJoints()
  888. local limbcolliderweld = Instance.new("Weld", limbcollider)
  889. limbcolliderweld.Part0 = limb
  890. limbcolliderweld.Part1 = limbcollider
  891. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  892. end
  893. local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  894. HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  895. if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
  896. makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
  897. end
  898. makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
  899. makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
  900. makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
  901. makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
  902. --
  903. makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
  904. makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
  905. makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
  906. --
  907. makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
  908. makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
  909. makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
  910. --
  911. makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
  912. makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
  913. makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
  914. for i,v in pairs(Humanoid.Parent:GetChildren()) do
  915. if v.ClassName == "Accessory" then
  916. local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  917. if attachment1 then
  918. for q,w in pairs(Humanoid.Parent:GetChildren()) do
  919. if w.ClassName == "Part" then
  920. local attachment2 = w:findFirstChild(attachment1.Name)
  921. if attachment2 then
  922. local hinge = Instance.new("HingeConstraint", v.Handle)
  923. hinge.Attachment0 = attachment1
  924. hinge.Attachment1 = attachment2
  925. hinge.LimitsEnabled = true
  926. hinge.LowerAngle = 0
  927. hinge.UpperAngle = 0
  928. end
  929. end
  930. end
  931. end
  932. end
  933. end
  934. for i,v in pairs(ragdoll:GetChildren()) do
  935. for q,w in pairs(v:GetChildren()) do
  936. if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] then
  937. w:destroy()
  938. end
  939. end
  940. end
  941. if ragdoll:findFirstChild("HumanoidRootPart") then
  942. ragdoll.HumanoidRootPart.Anchored = true
  943. ragdoll.HumanoidRootPart.CanCollide = false
  944. end
  945. if ragdoll:findFirstChildOfClass("Humanoid") then
  946. ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  947. end
  948. local function waitfordatmoment()
  949. wait(0.2)
  950. local function searchforvelocity(wot)
  951. for i,v in pairs(wot:GetChildren()) do
  952. searchforvelocity(v)
  953. if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  954. v:destroy()
  955. end
  956. end
  957. end
  958. searchforvelocity(ragdoll)
  959. end
  960. spawn(waitfordatmoment)
  961. game.Debris:AddItem(ragdoll, 30)
  962. end
  963. end
  964. end))
  965. Camera15.Name = "ThumbnailCamera"
  966. Camera15.Parent = Tool0
  967. Camera15.CFrame = CFrame.new(3.01131964, 1.70072341, -15.2324295, 0.506096363, -0.263865292, 0.821122169, -0, 0.952051163, 0.305938959, -0.862476945, -0.154834598, 0.481829643)
  968. Camera15.CoordinateFrame = CFrame.new(3.01131964, 1.70072341, -15.2324295, 0.506096363, -0.263865292, 0.821122169, -0, 0.952051163, 0.305938959, -0.862476945, -0.154834598, 0.481829643)
  969. Camera15.Focus = CFrame.new(1.3690753, 1.08884549, -16.1960888, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  970. Camera15.focus = CFrame.new(1.3690753, 1.08884549, -16.1960888, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  971. for i,v in pairs(mas:GetChildren()) do
  972. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  973. pcall(function() v:MakeJoints() end)
  974. end
  975. mas:Destroy()
  976. for i,v in pairs(cors) do
  977. spawn(function()
  978. pcall(v)
  979. end)
  980. end
Add Comment
Please, Sign In to add comment