hawoody

Gmod

Apr 16th, 2018
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.64 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Part1 = Instance.new("Part")
  20. Sound2 = Instance.new("Sound")
  21. Sound3 = Instance.new("Sound")
  22. SpecialMesh4 = Instance.new("SpecialMesh")
  23. Script5 = Instance.new("Script")
  24. Script6 = Instance.new("Script")
  25. Script7 = Instance.new("Script")
  26. Script8 = Instance.new("Script")
  27. Script9 = Instance.new("Script")
  28. Script10 = Instance.new("Script")
  29. Script11 = Instance.new("Script")
  30. Motor6D12 = Instance.new("Motor6D")
  31. Motor6D13 = Instance.new("Motor6D")
  32. Motor6D14 = Instance.new("Motor6D")
  33. Motor6D15 = Instance.new("Motor6D")
  34. Motor6D16 = Instance.new("Motor6D")
  35. Script17 = Instance.new("Script")
  36. LocalScript18 = Instance.new("LocalScript")
  37. LocalScript19 = Instance.new("LocalScript")
  38. Tool20 = Instance.new("Tool")
  39. Part21 = Instance.new("Part")
  40. CylinderMesh22 = Instance.new("CylinderMesh")
  41. Part23 = Instance.new("Part")
  42. SpecialMesh24 = Instance.new("SpecialMesh")
  43. LocalScript25 = Instance.new("LocalScript")
  44. Script26 = Instance.new("Script")
  45. LocalScript27 = Instance.new("LocalScript")
  46. Script28 = Instance.new("Script")
  47. LocalScript29 = Instance.new("LocalScript")
  48. Part30 = Instance.new("Part")
  49. Script31 = Instance.new("Script")
  50. Tool32 = Instance.new("Tool")
  51. LocalScript33 = Instance.new("LocalScript")
  52. LocalScript34 = Instance.new("LocalScript")
  53. Configuration35 = Instance.new("Configuration")
  54. NumberValue36 = Instance.new("NumberValue")
  55. NumberValue37 = Instance.new("NumberValue")
  56. BoolValue38 = Instance.new("BoolValue")
  57. NumberValue39 = Instance.new("NumberValue")
  58. NumberValue40 = Instance.new("NumberValue")
  59. Sound41 = Instance.new("Sound")
  60. LocalScript42 = Instance.new("LocalScript")
  61. Tool0.Name = "Lazer"
  62. Tool0.Parent = mas
  63. Tool0.TextureId = "http://www.roblox.com/asset/?id=13505853"
  64. Tool0.GripForward = Vector3.new(-0, 1, -0)
  65. Tool0.GripPos = Vector3.new(0, -0.600000024, -0.550000012)
  66. Tool0.GripUp = Vector3.new(0, 0, 1)
  67. Part1.Name = "Handle"
  68. Part1.Parent = Tool0
  69. Part1.Rotation = Vector3.new(-90, 0, 90)
  70. Part1.FormFactor = Enum.FormFactor.Plate
  71. Part1.Size = Vector3.new(1, 2, 1)
  72. Part1.CFrame = CFrame.new(7.80001831, 0.900000036, 6.8999939, 0, -1, 0, 0, 0, 1, -1, 0, 0)
  73. Part1.BottomSurface = Enum.SurfaceType.Smooth
  74. Part1.TopSurface = Enum.SurfaceType.Smooth
  75. Part1.Position = Vector3.new(7.80001831, 0.900000036, 6.8999939)
  76. Part1.Orientation = Vector3.new(-90, 90, 0)
  77. Sound2.Name = "EquipSound"
  78. Sound2.Parent = Part1
  79. Sound2.Pitch = 0.5
  80. Sound2.SoundId = "http://www.roblox.com/asset/?id=10756118"
  81. Sound3.Name = "PewPew"
  82. Sound3.Parent = Part1
  83. Sound3.Pitch = 0.5
  84. Sound3.SoundId = "http://www.roblox.com/asset/?id=13775480"
  85. Sound3.Volume = 1
  86. SpecialMesh4.Parent = Part1
  87. SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=22963494"
  88. SpecialMesh4.Scale = Vector3.new(1.29999995, 2, 1.29999995)
  89. SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=23396790"
  90. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  91. SpecialMesh4.Scale = Vector3.new(1.29999995, 2, 1.29999995)
  92. Script5.Name = "Script2"
  93. Script5.Parent = Part1
  94. Script5.Disabled = true
  95. table.insert(cors,sandbox(Script5,function()
  96. local h = game.StarterGui:getChildren()
  97. for i=1, #h do
  98. if h[i].Name == "Left Hip" then
  99. local joint = h[i]:clone()
  100. joint.Parent = script.Parent
  101. h[i].Part0 = script.Parent
  102. h[i].Part1 = script.Parent.Parent:findFirstChild("Left Leg")
  103. wait(0.1)
  104. script:remove()
  105. end
  106. end
  107.  
  108. end))
  109. Script6.Name = "Script3"
  110. Script6.Parent = Part1
  111. Script6.Disabled = true
  112. table.insert(cors,sandbox(Script6,function()
  113. local h = game.StarterGui:getChildren()
  114. for i=1, #h do
  115.  
  116. if h[i].Name == "Left Shoulder" then
  117. local joint = h[i]:clone()
  118. joint.Parent = script.Parent
  119. wait(1)
  120. h[i].Part0 = script.Parent
  121. h[i].Part1 = script.Parent.Parent:findFirstChild("Left Arm")
  122. wait(0.1)
  123. script:remove()
  124. end
  125. end
  126.  
  127. end))
  128. Script7.Name = "Script4"
  129. Script7.Parent = Part1
  130. Script7.Disabled = true
  131. table.insert(cors,sandbox(Script7,function()
  132. local h = game.StarterGui:getChildren()
  133. for i=1, #h do
  134.  
  135. if h[i].Name == "Right Hip" then
  136. local joint = h[i]:clone()
  137. joint.Parent = script.Parent
  138. wait(1)
  139. h[i].Part0 = script.Parent
  140. h[i].Part1 = script.Parent.Parent:findFirstChild("Right Leg")
  141. wait(0.1)
  142. script:remove()
  143. end
  144. end
  145.  
  146. end))
  147. Script8.Name = "Script5"
  148. Script8.Parent = Part1
  149. Script8.Disabled = true
  150. table.insert(cors,sandbox(Script8,function()
  151. local h = game.StarterGui:getChildren()
  152. for i=1, #h do
  153.  
  154. if h[i].Name == "Right Shoulder" then
  155. local joint = h[i]:clone()
  156. joint.Parent = script.Parent
  157. wait(1)
  158. h[i].Part0 = script.Parent
  159. h[i].Part1 = script.Parent.Parent:findFirstChild("Right Arm")
  160. wait(0.1)
  161. script:remove()
  162. end
  163. end
  164.  
  165. end))
  166. Script9.Name = "Script6"
  167. Script9.Parent = Part1
  168. Script9.Disabled = true
  169. table.insert(cors,sandbox(Script9,function()
  170. local h = game.StarterGui:getChildren()
  171. for i=1, #h do
  172.  
  173. if h[i].Name == "Neck" then
  174. local joint = h[i]:clone()
  175. joint.Parent = script.Parent
  176. wait(1)
  177. h[i].Part0 = script.Parent
  178. h[i].Part1 = script.Parent.Parent:findFirstChild("Head")
  179. wait(0.1)
  180. script:remove()
  181. end
  182. end
  183.  
  184. end))
  185. Script10.Name = "LaserBlast"
  186. Script10.Parent = Tool0
  187. Script10.Disabled = true
  188. table.insert(cors,sandbox(Script10,function()
  189. ball = script.Parent
  190.  
  191.  
  192.  
  193. function onTouched(hit)
  194. local humanoid = hit.Parent:findFirstChild("Humanoid")
  195.  
  196. if humanoid ~= nil then
  197. humanoid:TakeDamage(5)
  198. if hit.Parent:findFirstChild("Ragdoll") == nil then
  199. if hit.Parent.Torso:findFirstChild("Left Shoulder") ~= nil then
  200. hit.Parent.Torso:findFirstChild("Left Shoulder").Parent = nil
  201. end
  202. if hit.Parent.Torso:findFirstChild("Right Shoulder") ~= nil then
  203. hit.Parent.Torso:findFirstChild("Right Shoulder").Parent = nil
  204. end
  205. if hit.Parent.Torso:findFirstChild("Left Hip") ~= nil then
  206. hit.Parent.Torso:findFirstChild("Left Hip").Parent = nil
  207. end
  208. if hit.Parent.Torso:findFirstChild("Right Hip") ~= nil then
  209. hit.Parent.Torso:findFirstChild("Right Hip").Parent = nil
  210. end
  211.  
  212. script.Ragdoll:Clone().Parent = humanoid.Parent
  213. hit.archivable = true
  214. hit.Locked = false
  215. script:remove()
  216. else humanoid.Parent.Ragdoll:remove()
  217. local h = script.Parent.Parent.Lazer.Handle:getChildren()
  218. for i=1, #h do
  219. if h[i].className == "Script" then
  220. local j = h[i]:clone()
  221. j.Parent = humanoid.Parent.Torso
  222. j.Disabled = false
  223. local k = humanoid.Parent:getChildren()
  224. for i=1, #k do
  225. if k[i].Name == "Part" then
  226. k[i]:remove()
  227. end
  228. end
  229. humanoid.PlatformStand = false
  230. local anim = j.Parent.Parent:findFirstChild("Animate")
  231. local anim2 = j.Parent.Parent:findFirstChild("Animate"):clone()
  232. anim2.Parent = j.Parent.Parent
  233. anim:remove()
  234. script:remove()
  235. end
  236. end
  237. end
  238. end
  239. end
  240.  
  241. connection = ball.Touched:connect(onTouched)
  242.  
  243. wait(10)
  244. ball.Parent = nil
  245. end))
  246. Script11.Name = "Ragdoll"
  247. Script11.Parent = Script10
  248. table.insert(cors,sandbox(Script11,function()
  249. Character = script.Parent
  250. Torso = Character.Torso
  251. if Character then
  252. if Torso then
  253. Humanoid = Character:findFirstChild("Humanoid")
  254. Zombie = Character:findFirstChild("Zombie")
  255. if Humanoid ~= nil then
  256. Humanoid.PlatformStand = true
  257. end
  258.  
  259. if Zombie ~= nil then
  260. Zombie.PlatformStand = true
  261. end
  262.  
  263. local Head = Character:FindFirstChild("Head")
  264. if Head then
  265. local Neck = Instance.new("Weld")
  266. Neck.Name = "Neck"
  267. Neck.Part0 = Torso
  268. Neck.Part1 = Head
  269. Neck.C0 = CFrame.new(0, 1.5, 0)
  270. Neck.C1 = CFrame.new()
  271. Neck.Parent = Torso
  272. end
  273. local Limb = Character:FindFirstChild("Right Arm")
  274. if Limb then
  275.  
  276. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  277. local Joint = Instance.new("Glue")
  278. Joint.Name = "RightShoulder"
  279. Joint.Part0 = Torso
  280. Joint.Part1 = Limb
  281. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  282. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  283. Joint.Parent = Torso
  284.  
  285. local B = Instance.new("Part")
  286. B.TopSurface = 0
  287. B.BottomSurface = 0
  288. B.formFactor = "Symmetric"
  289. B.Size = Vector3.new(1, 1, 1)
  290. B.Transparency = 1
  291. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  292. B.Parent = Character
  293. local W = Instance.new("Weld")
  294. W.Part0 = Limb
  295. W.Part1 = B
  296. W.C0 = CFrame.new(0, -0.5, 0)
  297. W.Parent = Limb
  298.  
  299. end
  300. local Limb = Character:FindFirstChild("Left Arm")
  301. if Limb then
  302.  
  303. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  304. local Joint = Instance.new("Glue")
  305. Joint.Name = "LeftShoulder"
  306. Joint.Part0 = Torso
  307. Joint.Part1 = Limb
  308. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  309. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  310. Joint.Parent = Torso
  311.  
  312. local B = Instance.new("Part")
  313. B.TopSurface = 0
  314. B.BottomSurface = 0
  315. B.formFactor = "Symmetric"
  316. B.Size = Vector3.new(1, 1, 1)
  317. B.Transparency = 1
  318. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  319. B.Parent = Character
  320. local W = Instance.new("Weld")
  321. W.Part0 = Limb
  322. W.Part1 = B
  323. W.C0 = CFrame.new(0, -0.5, 0)
  324. W.Parent = Limb
  325.  
  326. end
  327. local Limb = Character:FindFirstChild("Right Leg")
  328. if Limb then
  329.  
  330. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  331. local Joint = Instance.new("Glue")
  332. Joint.Name = "RightHip"
  333. Joint.Part0 = Torso
  334. Joint.Part1 = Limb
  335. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  336. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  337. Joint.Parent = Torso
  338.  
  339. local B = Instance.new("Part")
  340. B.TopSurface = 0
  341. B.BottomSurface = 0
  342. B.formFactor = "Symmetric"
  343. B.Size = Vector3.new(1, 1, 1)
  344. B.Transparency = 1
  345. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  346. B.Parent = Character
  347. local W = Instance.new("Weld")
  348. W.Part0 = Limb
  349. W.Part1 = B
  350. W.C0 = CFrame.new(0, -0.5, 0)
  351. W.Parent = Limb
  352.  
  353. end
  354. local Limb = Character:FindFirstChild("Left Leg")
  355. if Limb then
  356.  
  357. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  358. local Joint = Instance.new("Glue")
  359. Joint.Name = "LeftHip"
  360. Joint.Part0 = Torso
  361. Joint.Part1 = Limb
  362. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  363. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  364. Joint.Parent = Torso
  365.  
  366. local B = Instance.new("Part")
  367. B.TopSurface = 0
  368. B.BottomSurface = 0
  369. B.formFactor = "Symmetric"
  370. B.Size = Vector3.new(1, 1, 1)
  371. B.Transparency = 1
  372. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  373. B.Parent = Character
  374. local W = Instance.new("Weld")
  375. W.Part0 = Limb
  376. W.Part1 = B
  377. W.C0 = CFrame.new(0, -0.5, 0)
  378. W.Parent = Limb
  379.  
  380. end
  381. --[
  382. local Bar = Instance.new("Part")
  383. Bar.TopSurface = 0
  384. Bar.BottomSurface = 0
  385. Bar.formFactor = "Symmetric"
  386. Bar.Size = Vector3.new(1, 1, 1)
  387. Bar.Transparency = 1
  388. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  389. Bar.Parent = Character
  390. local Weld = Instance.new("Weld")
  391. Weld.Part0 = Torso
  392. Weld.Part1 = Bar
  393. Weld.C0 = CFrame.new(0, 0.5, 0)
  394. Weld.Parent = Torso
  395. --]]
  396. end
  397. end
  398.  
  399. end))
  400. Motor6D12.Name = "Left Shoulder"
  401. Motor6D12.Parent = Tool0
  402. Motor6D12.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  403. Motor6D12.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  404. Motor6D12.DesiredAngle = -0.037995081394911
  405. Motor6D12.MaxVelocity = 0.15000000596046
  406. Motor6D13.Name = "Left Hip"
  407. Motor6D13.Parent = Tool0
  408. Motor6D13.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  409. Motor6D13.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  410. Motor6D13.DesiredAngle = 0.037995081394911
  411. Motor6D13.MaxVelocity = 0.10000000149012
  412. Motor6D14.Name = "Right Hip"
  413. Motor6D14.Parent = Tool0
  414. Motor6D14.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  415. Motor6D14.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  416. Motor6D14.DesiredAngle = 0.037995081394911
  417. Motor6D14.MaxVelocity = 0.10000000149012
  418. Motor6D15.Name = "Neck"
  419. Motor6D15.Parent = Tool0
  420. Motor6D15.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  421. Motor6D15.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  422. Motor6D15.MaxVelocity = 0.10000000149012
  423. Motor6D16.Name = "Right Shoulder"
  424. Motor6D16.Parent = Tool0
  425. Motor6D16.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  426. Motor6D16.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  427. Motor6D16.DesiredAngle = -0.037995081394911
  428. Motor6D16.MaxVelocity = 0.15000000596046
  429. Script17.Name = "RayGun"
  430. Script17.Parent = Tool0
  431. table.insert(cors,sandbox(Script17,function()
  432. local Tool = script.Parent;
  433.  
  434. enabled = true
  435.  
  436. local spark = Instance.new("Sparkles")
  437. spark.Color = Color3.new(1,1,0)
  438.  
  439. function fire(v)
  440.  
  441. local vCharacter = Tool.Parent
  442. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  443.  
  444. local missile = Instance.new("Part")
  445.  
  446.  
  447. spark:Clone().Parent = missile
  448.  
  449. local spawnPos = vCharacter.PrimaryPart.Position
  450.  
  451. local PewPew = Tool.Handle:FindFirstChild("PewPew")
  452.  
  453. if (PewPew == nil) then
  454. PewPew = Instance.new("Sound")
  455. PewPew.Name = "PewPew"
  456. PewPew.SoundId = "http://www.roblox.com/asset/?id=13775480"
  457. PewPew.Parent = Tool.Handle
  458. PewPew.Pitch = 0.5
  459. PewPew.Volume = 1
  460. end
  461.  
  462.  
  463. spawnPos = spawnPos + (v * 10)
  464.  
  465.  
  466. missile.Position = spawnPos
  467. missile.Size = Vector3.new(1,1,1)
  468. missile.Velocity = v * 180
  469. missile.BrickColor = BrickColor.new(1004)
  470. missile.Shape = 0
  471. missile.BottomSurface = 0
  472. missile.TopSurface = 0
  473. missile.Name = "Spark"
  474. missile.Reflectance = .5
  475.  
  476.  
  477. local force = Instance.new("BodyForce")
  478. force.force = Vector3.new(0,98,0)
  479. force.Parent = missile
  480.  
  481. local creator_tag = Instance.new("ObjectValue")
  482. creator_tag.Value = vPlayer
  483. creator_tag.Name = "creator"
  484. creator_tag.Parent = missile
  485.  
  486. local new_script = script.Parent.LaserBlast:clone()
  487. new_script.Disabled = false
  488. new_script.Parent = missile
  489.  
  490. missile.Parent = Tool.Parent
  491.  
  492. PewPew:Play()
  493.  
  494. end
  495.  
  496.  
  497.  
  498. function gunUp()
  499. Tool.GripForward = Vector3.new(0,.981,-.196)
  500. Tool.GripRight = Vector3.new(1,0,0)
  501. Tool.GripUp = Vector3.new(0,.196,.981)
  502. end
  503.  
  504. function gunOut()
  505. Tool.GripForward = Vector3.new(0,1,0)
  506. Tool.GripRight = Vector3.new(1,0,0)
  507. Tool.GripUp = Vector3.new(0,0,1)
  508. end
  509.  
  510.  
  511. function onActivated()
  512. if not enabled then
  513. return
  514. end
  515.  
  516. enabled = false
  517.  
  518.  
  519. local character = Tool.Parent;
  520. local humanoid = character.Humanoid
  521. if humanoid == nil then
  522. print("Humanoid not found")
  523. return
  524. end
  525.  
  526. local targetPos = humanoid.TargetPoint
  527. local lookAt = (targetPos - character.Head.Position).unit
  528.  
  529. local reload = .1
  530.  
  531.  
  532. gunUp()
  533. fire(lookAt)
  534. wait(reload)
  535. gunOut()
  536. wait(reload)
  537.  
  538. enabled = true
  539.  
  540. end
  541.  
  542. function onEquipped()
  543. Tool.Handle.EquipSound:play()
  544. end
  545.  
  546. script.Parent.Activated:connect(onActivated)
  547. script.Parent.Equipped:connect(onEquipped)
  548.  
  549. end))
  550. LocalScript18.Name = "Local Gui"
  551. LocalScript18.Parent = Tool0
  552. table.insert(cors,sandbox(LocalScript18,function()
  553. local Tool = script.Parent;
  554.  
  555. enabled = true
  556. function onButton1Down(mouse)
  557. if not enabled then
  558. return
  559. end
  560.  
  561. enabled = false
  562. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  563.  
  564. wait(.2)
  565. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  566. enabled = true
  567.  
  568. end
  569.  
  570. function onEquippedLocal(mouse)
  571.  
  572. if mouse == nil then
  573. print("Mouse not found")
  574. return
  575. end
  576.  
  577. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  578. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  579. end
  580.  
  581.  
  582. Tool.Equipped:connect(onEquippedLocal)
  583.  
  584. end))
  585. LocalScript19.Name = "Crouch"
  586. LocalScript19.Parent = Tool0
  587. table.insert(cors,sandbox(LocalScript19,function()
  588. on = 0
  589. Tool = script.Parent
  590. welds = {}
  591. sh = {}
  592. arms = nil
  593. torso = nil
  594. f = nil
  595. function Crouch(ison)
  596. if arms == nil and torso == nil then
  597. arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
  598. torso = Tool.Parent:FindFirstChild("Torso")
  599. end
  600. if arms ~= nil and torso ~= nil then
  601. sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
  602. if sh ~= nil then
  603. local yes = true
  604. if yes then
  605. yes = false
  606. if ison == 1 then
  607. sh[1].Part1 = nil
  608. sh[2].Part1 = nil
  609. local weld1 = Instance.new("Weld")
  610. weld1.Part0 = torso
  611. weld1.Parent = torso
  612. weld1.Part1 = arms[1]
  613. weld1.C1 = CFrame.new(-0.5, 0.75, 1)
  614. arms[1].Name = "LDave"
  615. arms[1].CanCollide = true
  616. welds[1] = weld1
  617. -------------------------------------------
  618. local weld2 = Instance.new("Weld")
  619. weld2.Part0 = torso
  620. weld2.Parent = torso
  621. weld2.Part1 = arms[2]
  622. weld2.C1 = CFrame.new(0.5,0.495,1.25) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
  623. arms[2].Name = "RDave"
  624. arms[2].CanCollide = true
  625. welds[2] = weld2
  626. ---------------------------------
  627. local force = Instance.new("BodyForce")
  628. force.Parent = torso
  629. f = force
  630. wait(0.01)
  631. elseif ison == 0 then
  632. if arms then
  633. sh[1].Part1 = arms[1]
  634. sh[2].Part1 = arms[2]
  635. f.Parent = nil
  636. arms[2].Name = "Right Leg"
  637. arms[1].Name = "Left Leg"
  638. welds[1].Parent = nil
  639. welds[2].Parent = nil
  640. end
  641. end
  642. --
  643. end
  644. else
  645. print("sh")
  646. end
  647. else
  648. print("arms")
  649. end
  650. end
  651. function Key(key)
  652. if key then
  653. key = string.lower(key)
  654. if (key=="c") then
  655. if on == 1 then
  656. on = 0
  657. elseif on == 0 then
  658. on = 1
  659. end
  660. Crouch(on)
  661. end
  662. end
  663. end
  664. function Equip(mouse)
  665. mouse.KeyDown:connect(Key)
  666. end
  667. script.Parent.Equipped:connect(Equip)
  668.  
  669.  
  670. end))
  671. Tool20.Name = "Physics Gun"
  672. Tool20.Parent = mas
  673. Tool20.CanBeDropped = false
  674. Part21.Name = "Handle"
  675. Part21.Parent = Tool20
  676. Part21.Material = Enum.Material.Neon
  677. Part21.BrickColor = BrickColor.new("Cyan")
  678. Part21.Transparency = 1
  679. Part21.CanCollide = false
  680. Part21.FormFactor = Enum.FormFactor.Custom
  681. Part21.Size = Vector3.new(1, 0.400000036, 0.300000012)
  682. Part21.CFrame = CFrame.new(0.149997994, 0.686568975, -12.9999981, 1, -4.82296491e-05, -1.3726883e-06, 4.82297946e-05, 1, -1.89604953e-06, 1.37278903e-06, 1.89598336e-06, 1)
  683. Part21.BottomSurface = Enum.SurfaceType.Smooth
  684. Part21.TopSurface = Enum.SurfaceType.Smooth
  685. Part21.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  686. Part21.Position = Vector3.new(0.149997994, 0.686568975, -12.9999981)
  687. Part21.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  688. CylinderMesh22.Parent = Part21
  689. CylinderMesh22.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  690. CylinderMesh22.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  691. Part23.Name = "Shoot"
  692. Part23.Parent = Tool20
  693. Part23.Material = Enum.Material.Neon
  694. Part23.BrickColor = BrickColor.new("Cyan")
  695. Part23.Reflectance = 0.30000001192093
  696. Part23.Transparency = 1
  697. Part23.Rotation = Vector3.new(106, -45, -90)
  698. Part23.CanCollide = false
  699. Part23.FormFactor = Enum.FormFactor.Custom
  700. Part23.Size = Vector3.new(1, 1, 1)
  701. Part23.CFrame = CFrame.new(0.79999876, 0.817569196, -13.8999977, -4.93427106e-05, 0.707106769, -0.707106769, 0.275634497, -0.67970562, -0.679724872, -0.961262524, -0.194936559, -0.194869474)
  702. Part23.BottomSurface = Enum.SurfaceType.Smooth
  703. Part23.TopSurface = Enum.SurfaceType.Smooth
  704. Part23.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  705. Part23.Position = Vector3.new(0.79999876, 0.817569196, -13.8999977)
  706. Part23.Orientation = Vector3.new(42.8199997, -105.409996, 157.929993)
  707. Part23.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  708. SpecialMesh24.Parent = Part23
  709. SpecialMesh24.MeshId = "http://www.roblox.com/asset/?id=1031410"
  710. SpecialMesh24.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  711. SpecialMesh24.MeshType = Enum.MeshType.FileMesh
  712. SpecialMesh24.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  713. LocalScript25.Parent = Tool20
  714. table.insert(cors,sandbox(LocalScript25,function()
  715. -- Variables for services
  716. local render = game:GetService("RunService").RenderStepped
  717. local contextActionService = game:GetService("ContextActionService")
  718. local userInputService = game:GetService("UserInputService")
  719.  
  720. local player = game.Players.LocalPlayer
  721. local mouse = player:GetMouse()
  722. local Tool = script.Parent
  723.  
  724. -- Variables for Module Scripts
  725. local screenSpace = require(Tool:WaitForChild("ScreenSpace"))
  726.  
  727. local connection
  728. -- Variables for character joints
  729.  
  730. local neck, shoulder, oldNeckC0, oldShoulderC0
  731.  
  732. local mobileShouldTrack = true
  733.  
  734. -- Thourough check to see if a character is sitting
  735. local function amISitting(character)
  736. local t = character.Torso
  737. for _, part in pairs(t:GetConnectedParts(true)) do
  738. if part:IsA("Seat") or part:IsA("VehicleSeat") then
  739. return true
  740. end
  741. end
  742. end
  743.  
  744. -- Function to call on renderstepped. Orients the character so it is facing towards
  745. -- the player mouse's position in world space. If character is sitting then the torso
  746. -- should not track
  747. local function frame(mousePosition)
  748. -- Special mobile consideration. We don't want to track if the user was touching a ui
  749. -- element such as the movement controls. Just return out of function if so to make sure
  750. -- character doesn't track
  751. if not mobileShouldTrack then return end
  752.  
  753. -- Make sure character isn't swiming. If the character is swimming the following code will
  754. -- not work well; the character will not swim correctly. Besides, who shoots underwater?
  755. if player.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then
  756. local torso = player.Character.Torso
  757. local head = player.Character.Head
  758.  
  759. local toMouse = (mousePosition - head.Position).unit
  760. local angle = math.acos(toMouse:Dot(Vector3.new(0,1,0)))
  761.  
  762. local neckAngle = angle
  763.  
  764. -- Limit how much the head can tilt down. Too far and the head looks unnatural
  765. if math.deg(neckAngle) > 110 then
  766. neckAngle = math.rad(110)
  767. end
  768. neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.pi - neckAngle,math.pi,0)
  769.  
  770. -- Calculate horizontal rotation
  771. local arm = player.Character:FindFirstChild("Right Arm")
  772. local fromArmPos = torso.Position + torso.CFrame:vectorToWorldSpace(Vector3.new(
  773. torso.Size.X/2 + arm.Size.X/2, torso.Size.Y/2 - arm.Size.Z/2, 0))
  774. local toMouseArm = ((mousePosition - fromArmPos) * Vector3.new(1,0,1)).unit
  775. local look = (torso.CFrame.lookVector * Vector3.new(1,0,1)).unit
  776. local lateralAngle = math.acos(toMouseArm:Dot(look))
  777.  
  778. -- Check for rogue math
  779. if tostring(lateralAngle) == "-1.#IND" then
  780. lateralAngle = 0
  781. end
  782.  
  783. -- Handle case where character is sitting down
  784. if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then
  785.  
  786. local cross = torso.CFrame.lookVector:Cross(toMouseArm)
  787. if lateralAngle > math.pi/2 then
  788. lateralAngle = math.pi/2
  789. end
  790. if cross.Y < 0 then
  791. lateralAngle = -lateralAngle
  792. end
  793. end
  794.  
  795. -- Turn shoulder to point to mouse
  796. shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.pi/2 - angle,math.pi/2 + lateralAngle,0)
  797.  
  798. -- If not sitting then aim torso laterally towards mouse
  799. if not amISitting(player.Character) then
  800. torso.CFrame = CFrame.new(torso.Position, torso.Position + (Vector3.new(
  801. mousePosition.X, torso.Position.Y, mousePosition.Z)-torso.Position).unit)
  802. else
  803. --print("sitting")
  804. end
  805. end
  806. end
  807.  
  808. -- Function to bind to render stepped if player is on PC
  809. local function pcFrame()
  810. frame(mouse.Hit.p)
  811. end
  812.  
  813. -- Function to bind to touch moved if player is on mobile
  814. local function mobileFrame(touch, processed)
  815. -- Check to see if the touch was on a UI element. If so, we don't want to update anything
  816. if not processed then
  817. -- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
  818. -- to create a ray from the camera.
  819. local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
  820. local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1))
  821. nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
  822. local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y,50)
  823. farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
  824. if farPos.magnitude > 900 then
  825. farPos = farPos.unit * 900
  826. end
  827. local ray = Ray.new(nearPos, farPos)
  828. local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)
  829.  
  830. -- if a position was found on the ray then update the character's rotation
  831. if pos then
  832. frame(pos)
  833. end
  834. end
  835. end
  836.  
  837. local oldIcon = nil
  838. -- Function to bind to equip event
  839. local function equip()
  840. local torso = player.Character.Torso
  841.  
  842. -- Setup joint variables
  843. neck = torso.Neck
  844. oldNeckC0 = neck.C0
  845. shoulder = torso:FindFirstChild("Right Shoulder")
  846. oldShoulderC0 = shoulder.C0
  847.  
  848. -- Remember old mouse icon and update current
  849. oldIcon = mouse.Icon
  850. mouse.Icon = "http://www.roblox.com/asset/?id=170477320"
  851.  
  852. -- Bind TouchMoved event if on mobile. Otherwise connect to renderstepped
  853. if userInputService.TouchEnabled then
  854. connection = userInputService.TouchMoved:connect(mobileFrame)
  855. else
  856. connection = render:connect(pcFrame)
  857. end
  858.  
  859. -- Bind TouchStarted and TouchEnded. Used to determine if character should rotate
  860. -- during touch input
  861. userInputService.TouchStarted:connect(function(touch, processed)
  862. mobileShouldTrack = not processed
  863. end)
  864. userInputService.TouchEnded:connect(function(touch, processed)
  865. mobileShouldTrack = false
  866. end)
  867.  
  868. -- Fire server's equip event
  869. game.ReplicatedStorage.ROBLOX_PistolEquipEvent:FireServer()
  870.  
  871. -- Bind event for when mouse is clicked to fire server's fire event
  872. mouse.Button1Down:connect(function()
  873. game.ReplicatedStorage.ROBLOX_PistolFireEvent:FireServer(mouse.Hit.p)
  874. end)
  875.  
  876. -- Bind reload event to mobile button and r key
  877. contextActionService:BindActionToInputTypes("Reload", function()
  878. game.ReplicatedStorage.ROBLOX_PistolReloadEvent:FireServer()
  879. end, true, "")
  880.  
  881. -- If game uses filtering enabled then need to update server while tool is
  882. -- held by character.
  883. if workspace.FilteringEnabled then
  884. while connection do
  885. wait()
  886. game.ReplicatedStorage.ROBLOX_PistolUpdateEvent:FireServer(neck.C0, shoulder.C0)
  887. end
  888. end
  889. end
  890.  
  891. -- Function to bind to Unequip event
  892. local function unequip()
  893. if connection then connection:disconnect() end
  894. contextActionService:UnbindAction("Reload")
  895. game.ReplicatedStorage.ROBLOX_PistolUnequipEvent:FireServer()
  896. mouse.Icon = oldIcon
  897. neck.C0 = oldNeckC0
  898. shoulder.C0 = oldShoulderC0
  899. end
  900.  
  901. -- Bind tool events
  902. Tool.Equipped:connect(equip)
  903. Tool.Unequipped:connect(unequip)
  904. end))
  905. Script26.Name = "qPerfectionWeld"
  906. Script26.Parent = Tool20
  907. table.insert(cors,sandbox(Script26,function()
  908. -- Created by Quenty (@Quenty, follow me on twitter).
  909. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  910. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  911.  
  912. --[[ INSTRUCTIONS
  913. - Place in the model
  914. - Make sure model is anchored
  915. - That's it. It will weld the model and all children.
  916.  
  917. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  918. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  919. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  920. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  921. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  922. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  923. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  924. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  925.  
  926. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  927. ]]
  928.  
  929. --[[ DOCUMENTATION
  930. - Will work in tools. If ran more than once it will not create more than one weld. This is especially useful for tools that are dropped and then picked up again.
  931. - Will work in PBS servers
  932. - Will work as long as it starts out with the part anchored
  933. - Stores the relative CFrame as a CFrame value
  934. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  935. - Utilizes a recursive algorith to find all parts in the model
  936. - Will reweld on script reparent if the script is initially parented to a tool.
  937. - Welds as fast as possible
  938. ]]
  939.  
  940. -- qPerfectionWeld.lua
  941. -- Created 10/6/2014
  942. -- Author: Quenty
  943. -- Version 1.0.3
  944.  
  945. -- Updated 10/14/2014 - Updated to 1.0.1
  946. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  947.  
  948. -- Updated 10/14/2014 - Updated to 1.0.2
  949. --- Fixed bug fix.
  950.  
  951. -- Updated 10/14/2014 - Updated to 1.0.3
  952. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  953.  
  954. local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
  955.  
  956.  
  957. local function CallOnChildren(Instance, FunctionToCall)
  958. -- Calls a function on each of the children of a certain object, using recursion.
  959.  
  960. FunctionToCall(Instance)
  961.  
  962. for _, Child in next, Instance:GetChildren() do
  963. CallOnChildren(Child, FunctionToCall)
  964. end
  965. end
  966.  
  967. local function GetNearestParent(Instance, ClassName)
  968. -- Returns the nearest parent of a certain class, or returns nil
  969.  
  970. local Ancestor = Instance
  971. repeat
  972. Ancestor = Ancestor.Parent
  973. if Ancestor == nil then
  974. return nil
  975. end
  976. until Ancestor:IsA(ClassName)
  977.  
  978. return Ancestor
  979. end
  980.  
  981. local function GetBricks(StartInstance)
  982. local List = {}
  983.  
  984. -- if StartInstance:IsA("BasePart") then
  985. -- List[#List+1] = StartInstance
  986. -- end
  987.  
  988. CallOnChildren(StartInstance, function(Item)
  989. if Item:IsA("BasePart") then
  990. List[#List+1] = Item;
  991. end
  992. end)
  993.  
  994. return List
  995. end
  996.  
  997. local function Modify(Instance, Values)
  998. -- Modifies an Instance by using a table.
  999.  
  1000. assert(type(Values) == "table", "Values is not a table");
  1001.  
  1002. for Index, Value in next, Values do
  1003. if type(Index) == "number" then
  1004. Value.Parent = Instance
  1005. else
  1006. Instance[Index] = Value
  1007. end
  1008. end
  1009. return Instance
  1010. end
  1011.  
  1012. local function Make(ClassType, Properties)
  1013. -- Using a syntax hack to create a nice way to Make new items.
  1014.  
  1015. return Modify(Instance.new(ClassType), Properties)
  1016. end
  1017.  
  1018. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  1019. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  1020.  
  1021. local function HasWheelJoint(Part)
  1022. for _, SurfaceName in pairs(Surfaces) do
  1023. for _, HingSurfaceName in pairs(HingSurfaces) do
  1024. if Part[SurfaceName].Name == HingSurfaceName then
  1025. return true
  1026. end
  1027. end
  1028. end
  1029.  
  1030. return false
  1031. end
  1032.  
  1033. local function ShouldBreakJoints(Part)
  1034. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  1035. -- definitely some edge cases.
  1036.  
  1037. if NEVER_BREAK_JOINTS then
  1038. return false
  1039. end
  1040.  
  1041. if HasWheelJoint(Part) then
  1042. return false
  1043. end
  1044.  
  1045. local Connected = Part:GetConnectedParts()
  1046.  
  1047. if #Connected == 1 then
  1048. return false
  1049. end
  1050.  
  1051. for _, Item in pairs(Connected) do
  1052. if HasWheelJoint(Item) then
  1053. return false
  1054. elseif not Item:IsDescendantOf(script.Parent) then
  1055. return false
  1056. end
  1057. end
  1058.  
  1059. return true
  1060. end
  1061.  
  1062. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  1063. --- Weld's 2 parts together
  1064. -- @param Part0 The first part
  1065. -- @param Part1 The second part (Dependent part most of the time).
  1066. -- @param [JointType] The type of joint. Defaults to weld.
  1067. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  1068. -- @return The weld created.
  1069.  
  1070. JointType = JointType or "Weld"
  1071. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  1072.  
  1073. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  1074. Modify(NewWeld, {
  1075. Name = "qCFrameWeldThingy";
  1076. Part0 = Part0;
  1077. Part1 = Part1;
  1078. C0 = CFrame.new();--Part0.CFrame:inverse();
  1079. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  1080. Parent = Part1;
  1081. })
  1082.  
  1083. if not RelativeValue then
  1084. RelativeValue = Make("CFrameValue", {
  1085. Parent = Part1;
  1086. Name = "qRelativeCFrameWeldValue";
  1087. Archivable = true;
  1088. Value = NewWeld.C1;
  1089. })
  1090. end
  1091.  
  1092. return NewWeld
  1093. end
  1094.  
  1095. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  1096. -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  1097. -- @param MainPart The part to weld the model to (can be in the model).
  1098. -- @param [JointType] The type of joint. Defaults to weld.
  1099. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  1100.  
  1101. for _, Part in pairs(Parts) do
  1102. if ShouldBreakJoints(Part) then
  1103. Part:BreakJoints()
  1104. end
  1105. end
  1106.  
  1107. for _, Part in pairs(Parts) do
  1108. if Part ~= MainPart then
  1109. WeldTogether(MainPart, Part, JointType, MainPart)
  1110. end
  1111. end
  1112.  
  1113. if not DoNotUnanchor then
  1114. for _, Part in pairs(Parts) do
  1115. Part.Anchored = false
  1116. end
  1117. MainPart.Anchored = false
  1118. end
  1119. end
  1120.  
  1121. local function PerfectionWeld()
  1122. local Tool = GetNearestParent(script, "Tool")
  1123.  
  1124. local Parts = GetBricks(script.Parent)
  1125. local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
  1126.  
  1127. if PrimaryPart then
  1128. WeldParts(Parts, PrimaryPart, "Weld", false)
  1129. else
  1130. warn("qWeld - Unable to weld part")
  1131. end
  1132.  
  1133. return Tool
  1134. end
  1135.  
  1136. local Tool = PerfectionWeld()
  1137.  
  1138.  
  1139. if Tool and script.ClassName == "Script" then
  1140. --- Don't bother with local scripts
  1141.  
  1142. script.Parent.AncestryChanged:connect(function()
  1143. PerfectionWeld()
  1144. end)
  1145. end
  1146.  
  1147. -- Created by Quenty (@Quenty, follow me on twitter).
  1148.  
  1149. end))
  1150. LocalScript27.Name = "AnimateScript(EM-500)"
  1151. LocalScript27.Parent = Tool20
  1152. table.insert(cors,sandbox(LocalScript27,function()
  1153. local arms = nil
  1154. local torso = nil
  1155. local welds = {}
  1156. local Tool = script.Parent
  1157. local neck = nil
  1158. local orginalC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  1159.  
  1160. function Equip(mouse)
  1161. wait(0.01)
  1162. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  1163. head = Tool.Parent:FindFirstChild("Head")
  1164. torso = Tool.Parent:FindFirstChild("Torso")
  1165. if neck == nil then
  1166. neck = Tool.Parent:FindFirstChild("Torso").Neck
  1167. end
  1168. if arms ~= nil and torso ~= nil then
  1169. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  1170. if sh ~= nil then
  1171. local yes = true
  1172. if yes then
  1173. yes = false
  1174. sh[1].Part1 = nil
  1175. sh[2].Part1 = nil
  1176. local weld1 = Instance.new("Weld")
  1177. weld1.Part0 = head
  1178. weld1.Parent = head
  1179. weld1.Part1 = arms[1]
  1180. welds[1] = weld1
  1181. local weld2 = Instance.new("Weld")
  1182. weld2.Part0 = head
  1183. weld2.Parent = head
  1184. weld2.Part1 = arms[2]
  1185. welds[2] = weld2
  1186. -------------------------here
  1187. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1188. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1189. mouse.Move:connect(function ()
  1190. --local Direction = Tool.Direction.Value
  1191. local Direction = mouse.Hit.p
  1192. local b = head.Position.Y-Direction.Y
  1193. local dist = (head.Position-Direction).magnitude
  1194. local answer = math.asin(b/dist)
  1195. neck.C0=orginalC0*CFrame.fromEulerAnglesXYZ(answer,0,0)
  1196. wait(0.1)
  1197. end)end
  1198. else
  1199. print("sh")
  1200. end
  1201. else
  1202. print("arms")
  1203. end
  1204. end
  1205.  
  1206. function Unequip(mouse)
  1207. if arms ~= nil and torso ~= nil then
  1208. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  1209. if sh ~= nil then
  1210. local yes = true
  1211. if yes then
  1212. yes = false
  1213. neck.C0 = orginalC0
  1214.  
  1215. sh[1].Part1 = arms[1]
  1216. sh[2].Part1 = arms[2]
  1217. welds[1].Parent = nil
  1218. welds[2].Parent = nil
  1219. end
  1220. else
  1221. print("sh")
  1222. end
  1223. else
  1224. print("arms")
  1225. end
  1226. end
  1227. Tool.Equipped:connect(Equip)
  1228. Tool.Unequipped:connect(Unequip)
  1229.  
  1230. function Animate()
  1231. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  1232. if Tool.AnimateValue.Value == "Shoot" then
  1233. local weld1 = welds[1]
  1234. local weld2 = welds[2]
  1235. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1236. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1237. wait(0.00001)
  1238. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.05, math.rad(-90))
  1239. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1240. wait(0.00001)
  1241. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.1, math.rad(-90))
  1242. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  1243. wait(0.00001)
  1244. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.3, math.rad(-90))
  1245. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  1246. wait(0.00001)
  1247. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.35, math.rad(-90))
  1248. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  1249. wait(0.00001)
  1250. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1251. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1252. wait(0.00001)
  1253. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1254. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1255. Tool.AnimateValue.Value = "None"
  1256. end
  1257. if Tool.AnimateValue.Value == "Reload" then
  1258. local weld1 = welds[1]
  1259. local weld2 = welds[2]
  1260. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1261. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1262. wait(0.0001)
  1263. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1264. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1265. wait(0.0001)
  1266. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1267. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  1268. wait(0.0001)
  1269. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1270. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-100), math.rad(-15), 0)
  1271. wait(0.0001)
  1272. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1273. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-105), math.rad(-15), 0)
  1274. wait(0.0001)
  1275. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1276. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  1277. wait(0.0001)
  1278. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1279. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  1280. wait(0.0001)
  1281. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.45, math.rad(-90))
  1282. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1283. wait(0.0001)
  1284. weld1.C1 = CFrame.new(-0.5+1.5, 0.9, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.5, math.rad(-90))
  1285. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1286. wait(0.0001)
  1287. weld1.C1 = CFrame.new(-0.5+1.5, 1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.55, math.rad(-90))
  1288. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1289. wait(0.0001)
  1290. weld1.C1 = CFrame.new(-0.5+1.5, 1.1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.57, math.rad(-90))
  1291. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1292. wait(0.0001)
  1293. weld1.C1 = CFrame.new(-0.5+1.5, 1.2, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  1294. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1295. wait(0.0001)
  1296. weld1.C1 = CFrame.new(-0.5+1.5, 1.3, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  1297. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1298. wait(0.0001)
  1299. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1300. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1301. Tool.AnimateValue.Value = "None"
  1302. end
  1303. end
  1304.  
  1305. Tool.AnimateValue.Changed:connect(Animate)
  1306.  
  1307. end))
  1308. Script28.Name = "LineConnect"
  1309. Script28.Parent = Tool20
  1310. Script28.Disabled = true
  1311. table.insert(cors,sandbox(Script28,function()
  1312. wait()
  1313. local check = script.Part2
  1314. local part1 = script.Part1.Value
  1315. local part2 = script.Part2.Value
  1316. local parent = script.Par.Value
  1317. local color = script.Color
  1318. local line = Instance.new("Part")
  1319. line.TopSurface = 0
  1320. line.BottomSurface = 0
  1321. line.Reflectance = .5
  1322. line.Name = "Laser"
  1323. line.Locked = true
  1324. line.CanCollide = false
  1325. line.Anchored = true
  1326. line.formFactor = 0
  1327. line.Size = Vector3.new(1,1,1)
  1328. local mesh = Instance.new("BlockMesh")
  1329. mesh.Parent = line
  1330. while true do
  1331. if (check.Value==nil) then break end
  1332. if (part1==nil or part2==nil or parent==nil) then break end
  1333. if (part1.Parent==nil or part2.Parent==nil) then break end
  1334. if (parent.Parent==nil) then break end
  1335. local lv = CFrame.new(part1.Position,part2.Position)
  1336. local dist = (part1.Position-part2.Position).magnitude
  1337. line.Parent = parent
  1338. line.Material = "Neon"
  1339. line.BrickColor = color.Value.BrickColor
  1340. line.Reflectance = color.Value.Reflectance
  1341. line.Transparency = "0.2"
  1342. line.CFrame = CFrame.new(part1.Position+lv.lookVector*dist/2)
  1343. line.CFrame = CFrame.new(line.Position,part2.Position)
  1344. mesh.Scale = Vector3.new(.25,.25,dist)
  1345. wait()
  1346. end
  1347. line:remove()
  1348. script:remove()
  1349. end))
  1350. LocalScript29.Name = "MainScript"
  1351. LocalScript29.Parent = Tool20
  1352. table.insert(cors,sandbox(LocalScript29,function()
  1353. wait()
  1354. tool = script.Parent
  1355. lineconnect = tool.LineConnect
  1356. object = nil
  1357. mousedown = false
  1358. found = false
  1359. BP = Instance.new("BodyPosition")
  1360. BP.maxForce = Vector3.new(math.huge*math.huge,math.huge*math.huge,math.huge*math.huge) --pwns everyone elses bodyposition
  1361. BP.P = BP.P*10 --faster movement. less bounceback.
  1362. dist = nil
  1363. point = Instance.new("Part")
  1364. point.Locked = true
  1365. point.Anchored = true
  1366. point.formFactor = 0
  1367. point.Shape = 0
  1368. point.BrickColor = BrickColor.new("Toothpaste")
  1369. point.Size = Vector3.new(1,1,1)
  1370. point.CanCollide = false
  1371. local mesh = Instance.new("SpecialMesh")
  1372. mesh.MeshType = "Sphere"
  1373. mesh.Scale = Vector3.new(.35,.35,.35)
  1374. mesh.Parent = point
  1375. handle = tool.Shoot
  1376. front = tool.Shoot
  1377. color = tool.Shoot
  1378. objval = nil
  1379. local hooked = false
  1380. local hookBP = BP:clone()
  1381. hookBP.maxForce = Vector3.new(30000,30000,30000)
  1382.  
  1383. function LineConnect(part1,part2,parent)
  1384. local p1 = Instance.new("ObjectValue")
  1385. p1.Value = part1
  1386. p1.Name = "Part1"
  1387. local p2 = Instance.new("ObjectValue")
  1388. p2.Value = part2
  1389. p2.Name = "Part2"
  1390. local par = Instance.new("ObjectValue")
  1391. par.Value = parent
  1392. par.Name = "Par"
  1393. local col = Instance.new("ObjectValue")
  1394. col.Value = color
  1395. col.Name = "Color"
  1396. local s = lineconnect:clone()
  1397. s.Disabled = false
  1398. p1.Parent = s
  1399. p2.Parent = s
  1400. par.Parent = s
  1401. col.Parent = s
  1402. s.Parent = workspace
  1403. if (part2==object) then
  1404. objval = p2
  1405. end
  1406. end
  1407.  
  1408. function onButton1Down(mouse)
  1409. if (mousedown==true) then return end
  1410. mousedown = true
  1411. coroutine.resume(coroutine.create(function()
  1412. local p = point:clone()
  1413. p.Parent = tool
  1414. LineConnect(front,p,workspace)
  1415. while (mousedown==true) do
  1416. p.Parent = tool
  1417. if (object==nil) then
  1418. if (mouse.Target==nil) then
  1419. local lv = CFrame.new(front.Position,mouse.Hit.p)
  1420. p.CFrame = CFrame.new(front.Position+(lv.lookVector*1000))
  1421. else
  1422. p.CFrame = CFrame.new(mouse.Hit.p)
  1423. end
  1424. else
  1425. LineConnect(front,object,workspace)
  1426. break
  1427. end
  1428. wait()
  1429. end
  1430. p:remove()
  1431. end))
  1432. while (mousedown==true) do
  1433. if (mouse.Target~=nil) then
  1434. local t = mouse.Target
  1435. if (t.Anchored==false) then
  1436. object = t
  1437. dist = (object.Position-front.Position).magnitude
  1438. break
  1439. end
  1440. end
  1441. wait()
  1442. end
  1443. while (mousedown==true) do
  1444. if (object.Parent==nil) then break end
  1445. local lv = CFrame.new(front.Position,mouse.Hit.p)
  1446. BP.Parent = object
  1447. BP.position = front.Position+lv.lookVector*dist
  1448. wait()
  1449. end
  1450. BP:remove()
  1451. object = nil
  1452. objval.Value = nil
  1453. end
  1454.  
  1455. function onKeyDown(key,mouse)
  1456. local key = key:lower()
  1457. local yesh = false
  1458. if (key=="q") then
  1459. if (dist>=5) then
  1460. dist = dist-5
  1461. end
  1462. end
  1463. if key == "" then
  1464. if (object==nil) then return end
  1465. for _,v in pairs(object:children()) do
  1466. if v.className == "BodyGyro" then
  1467. return nil
  1468. end
  1469. end
  1470. BG = Instance.new("BodyGyro")
  1471. BG.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  1472. BG.cframe = CFrame.new(object.CFrame.p)
  1473. BG.Parent = object
  1474. repeat wait() until(object.CFrame == CFrame.new(object.CFrame.p))
  1475. BG.Parent = nil
  1476. if (object==nil) then return end
  1477. for _,v in pairs(object:children()) do
  1478. if v.className == "BodyGyro" then
  1479. v.Parent = nil
  1480. end
  1481. end
  1482. object.Velocity = Vector3.new(0,0,0)
  1483. object.RotVelocity = Vector3.new(0,0,0)
  1484. end
  1485. if (key=="e") then
  1486. dist = dist+5
  1487. end
  1488. if (string.byte(key)==27) then
  1489. if (object==nil) then return end
  1490. local e = Instance.new("Explosion")
  1491. e.Parent = workspace
  1492. e.Position = object.Position
  1493. color.BrickColor = BrickColor.Black()
  1494. point.BrickColor = BrickColor.White()
  1495. wait(.48)
  1496. color.BrickColor = BrickColor.White()
  1497. point.BrickColor = BrickColor.Black()
  1498. end
  1499. if (key=="") then
  1500. if not hooked then
  1501. if (object==nil) then return end
  1502. hooked = true
  1503. hookBP.position = object.Position
  1504. if tool.Parent:findFirstChild("Torso") then
  1505. hookBP.Parent = tool.Parent.Torso
  1506. if dist ~= (object.Size.x+object.Size.y+object.Size.z)+5 then
  1507. dist = (object.Size.x+object.Size.y+object.Size.z)+5
  1508. end
  1509. end
  1510. else
  1511. hooked = false
  1512. hookBP.Parent = nil
  1513. end
  1514. end
  1515. if (key=="r") then
  1516. if (object==nil) then return end
  1517. color.BrickColor = BrickColor.new("Toothpaste")
  1518. point.BrickColor = BrickColor.new("Toothpaste")
  1519. object.Parent = nil
  1520. wait(.48)
  1521. color.BrickColor = BrickColor.new("Toothpaste")
  1522. point.BrickColor = BrickColor.new("Toothpaste")
  1523. end
  1524. if (key=="") then
  1525. if (object==nil) then return end
  1526. local New = object:clone()
  1527. New.Parent = object.Parent
  1528. for _,v in pairs(New:children()) do
  1529. if v.className == "BodyPosition" or v.className == "BodyGyro" then
  1530. v.Parent = nil
  1531. end
  1532. end
  1533. object = New
  1534. mousedown = false
  1535. mousedown = true
  1536. LineConnect(front,object,workspace)
  1537. while (mousedown==true) do
  1538. if (object.Parent==nil) then break end
  1539. local lv = CFrame.new(front.Position,mouse.Hit.p)
  1540. BP.Parent = object
  1541. BP.position = front.Position+lv.lookVector*dist
  1542. wait()
  1543. end
  1544. BP:remove()
  1545. object = nil
  1546. objval.Value = nil
  1547. end
  1548. if (key=="") then
  1549. local Cube = Instance.new("Part")
  1550. Cube.Locked = true
  1551. Cube.Size = Vector3.new(4,4,4)
  1552. Cube.formFactor = 0
  1553. Cube.TopSurface = 0
  1554. Cube.BottomSurface = 0
  1555. Cube.Name = "WeightedStorageCube"
  1556. Cube.Parent = workspace
  1557. Cube.CFrame = CFrame.new(mouse.Hit.p) + Vector3.new(0,2,0)
  1558. for i = 0,5 do
  1559. local Decal = Instance.new("Decal")
  1560. Decal.Texture = "http://www.roblox.com/asset/?id=2662260"
  1561. Decal.Face = i
  1562. Decal.Name = "WeightedStorageCubeDecal"
  1563. Decal.Parent = Cube
  1564. end
  1565. end
  1566. if (key=="") then
  1567. if dist ~= 15 then
  1568. dist = 15
  1569. end
  1570. end
  1571. end
  1572.  
  1573. function onEquipped(mouse)
  1574. keymouse = mouse
  1575. local char = tool.Parent
  1576. human = char.Humanoid
  1577. human.Changed:connect(function() if (human.Health==0) then mousedown = false BP:remove() point:remove() tool:remove() end end)
  1578. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  1579. mouse.Button1Up:connect(function() mousedown = false end)
  1580. mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
  1581. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  1582. end
  1583.  
  1584. tool.Equipped:connect(onEquipped)
  1585. end))
  1586. Part30.Parent = Tool20
  1587. Part30.Material = Enum.Material.Neon
  1588. Part30.BrickColor = BrickColor.new("Cyan")
  1589. Part30.Transparency = 0.5
  1590. Part30.Rotation = Vector3.new(180, -75, -180)
  1591. Part30.Shape = Enum.PartType.Cylinder
  1592. Part30.Size = Vector3.new(1.20000005, 0.649999976, 2)
  1593. Part30.CFrame = CFrame.new(0.699998736, 0.763569236, -13.2999983, -0.258819044, 7.17242793e-11, -0.965925813, -1.89857019e-11, 1, -6.84963197e-11, 0.965925813, 0, -0.258819044)
  1594. Part30.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1595. Part30.Position = Vector3.new(0.699998736, 0.763569236, -13.2999983)
  1596. Part30.Orientation = Vector3.new(0, -105, 0)
  1597. Part30.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1598. Script31.Name = "Glow Script"
  1599. Script31.Parent = Part30
  1600. table.insert(cors,sandbox(Script31,function()
  1601. while true do
  1602. wait(0.05)
  1603. script.Parent.Transparency = .5
  1604. wait(0.05)
  1605. script.Parent.Transparency = .6
  1606. wait(0.05)
  1607. script.Parent.Transparency = .7
  1608. wait(0.05)
  1609. script.Parent.Transparency = .8
  1610. wait(0.05)
  1611. script.Parent.Transparency = .9
  1612. wait(0.05)
  1613. script.Parent.Transparency = .8
  1614. wait(0.05)
  1615. script.Parent.Transparency = .7
  1616. wait(0.05)
  1617. script.Parent.Transparency = .6
  1618. wait(0.05)
  1619. script.Parent.Transparency = .5
  1620. end
  1621.  
  1622. end))
  1623. Tool32.Name = "Portal Gun"
  1624. Tool32.Parent = mas
  1625. Tool32.GripForward = Vector3.new(-0.102732286, 0.994709015, -0)
  1626. Tool32.GripPos = Vector3.new(-0.63109529, 0.452967376, -0.402335078)
  1627. Tool32.GripRight = Vector3.new(0.994709015, 0.102732286, -0.000126240688)
  1628. Tool32.GripUp = Vector3.new(0.000125572755, 1.29689943e-05, 1)
  1629. LocalScript33.Name = "AnimateScript(EM-500)"
  1630. LocalScript33.Parent = Tool32
  1631. table.insert(cors,sandbox(LocalScript33,function()
  1632. local MOUSE_ICON = 'rbxassetid://120192974' local Tool = script.Parent
  1633. local Mouse = nil local function UpdateIcon()
  1634. if Mouse then Mouse.Icon = Tool.Enabled and MOUSE_ICON end end local function OnEquipped(mouse) Mouse = mouse UpdateIcon() end local function OnChanged(property)
  1635. if property == 'Enabled' then UpdateIcon() end end Tool.Equipped:connect(OnEquipped) Tool.Changed:connect(OnChanged)
  1636.  
  1637. local arms = nil
  1638. local torso = nil
  1639. local welds = {}
  1640. local Tool = script.Parent
  1641. local neck = nil
  1642. local orginalC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  1643.  
  1644. function Equip(mouse)
  1645. wait(0.01)
  1646. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  1647. head = Tool.Parent:FindFirstChild("Head")
  1648. torso = Tool.Parent:FindFirstChild("Torso")
  1649. if neck == nil then
  1650. neck = Tool.Parent:FindFirstChild("Torso").Neck
  1651. end
  1652. if arms ~= nil and torso ~= nil then
  1653. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  1654. if sh ~= nil then
  1655. local yes = true
  1656. if yes then
  1657. yes = false
  1658. sh[1].Part1 = nil
  1659. sh[2].Part1 = nil
  1660. local weld1 = Instance.new("Weld")
  1661. weld1.Part0 = head
  1662. weld1.Parent = head
  1663. weld1.Part1 = arms[1]
  1664. welds[1] = weld1
  1665. local weld2 = Instance.new("Weld")
  1666. weld2.Part0 = head
  1667. weld2.Parent = head
  1668. weld2.Part1 = arms[2]
  1669. welds[2] = weld2
  1670. -------------------------here
  1671. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1672. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1673. mouse.Move:connect(function ()
  1674. --local Direction = Tool.Direction.Value
  1675. local Direction = mouse.Hit.p
  1676. local b = head.Position.Y-Direction.Y
  1677. local dist = (head.Position-Direction).magnitude
  1678. local answer = math.asin(b/dist)
  1679. neck.C0=orginalC0*CFrame.fromEulerAnglesXYZ(answer,0,0)
  1680. wait(0.1)
  1681. end)end
  1682. else
  1683. print("sh")
  1684. end
  1685. else
  1686. print("arms")
  1687. end
  1688. end
  1689.  
  1690. function Unequip(mouse)
  1691. if arms ~= nil and torso ~= nil then
  1692. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  1693. if sh ~= nil then
  1694. local yes = true
  1695. if yes then
  1696. yes = false
  1697. neck.C0 = orginalC0
  1698.  
  1699. sh[1].Part1 = arms[1]
  1700. sh[2].Part1 = arms[2]
  1701. welds[1].Parent = nil
  1702. welds[2].Parent = nil
  1703. end
  1704. else
  1705. print("sh")
  1706. end
  1707. else
  1708. print("arms")
  1709. end
  1710. end
  1711. Tool.Equipped:connect(Equip)
  1712. Tool.Unequipped:connect(Unequip)
  1713.  
  1714. function Animate()
  1715. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  1716. if Tool.AnimateValue.Value == "Shoot" then
  1717. local weld1 = welds[1]
  1718. local weld2 = welds[2]
  1719. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1720. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1721. wait(0.00001)
  1722. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.05, math.rad(-90))
  1723. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1724. wait(0.00001)
  1725. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.1, math.rad(-90))
  1726. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  1727. wait(0.00001)
  1728. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.3, math.rad(-90))
  1729. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  1730. wait(0.00001)
  1731. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.35, math.rad(-90))
  1732. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  1733. wait(0.00001)
  1734. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1735. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1736. wait(0.00001)
  1737. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1738. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1739. Tool.AnimateValue.Value = "None"
  1740. end
  1741. if Tool.AnimateValue.Value == "Reload" then
  1742. local weld1 = welds[1]
  1743. local weld2 = welds[2]
  1744. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1745. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1746. wait(0.0001)
  1747. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1748. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1749. wait(0.0001)
  1750. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1751. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  1752. wait(0.0001)
  1753. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1754. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-100), math.rad(-15), 0)
  1755. wait(0.0001)
  1756. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1757. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-105), math.rad(-15), 0)
  1758. wait(0.0001)
  1759. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1760. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  1761. wait(0.0001)
  1762. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  1763. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  1764. wait(0.0001)
  1765. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.45, math.rad(-90))
  1766. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1767. wait(0.0001)
  1768. weld1.C1 = CFrame.new(-0.5+1.5, 0.9, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.5, math.rad(-90))
  1769. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1770. wait(0.0001)
  1771. weld1.C1 = CFrame.new(-0.5+1.5, 1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.55, math.rad(-90))
  1772. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1773. wait(0.0001)
  1774. weld1.C1 = CFrame.new(-0.5+1.5, 1.1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.57, math.rad(-90))
  1775. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1776. wait(0.0001)
  1777. weld1.C1 = CFrame.new(-0.5+1.5, 1.2, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  1778. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1779. wait(0.0001)
  1780. weld1.C1 = CFrame.new(-0.5+1.5, 1.3, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  1781. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  1782. wait(0.0001)
  1783. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1784. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  1785. Tool.AnimateValue.Value = "None"
  1786. end
  1787. end
  1788.  
  1789. Tool.AnimateValue.Changed:connect(Animate)
  1790.  
  1791. end))
  1792. LocalScript34.Parent = Tool32
  1793. table.insert(cors,sandbox(LocalScript34,function()
  1794. local tool = script.Parent
  1795. local debris = game:GetService("Debris")
  1796. local timestart = false
  1797. local timer = 0
  1798. local model = Instance.new("Model",game.Workspace)
  1799. local colora = BrickColor.new(Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255))
  1800. local colorb = BrickColor.new(Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255))
  1801. print(colora)
  1802. print(colorb)
  1803. tool:WaitForChild("Settings")
  1804. local pp = script.Parent.Settings.PortalPower
  1805. local cw = script.Parent.Settings.CameraWait
  1806. local cg --[[;^)]] = script.Parent.Settings.CanGrab
  1807. local gp = script.Parent.Settings.GrabPower
  1808. local gr = script.Parent.Settings.GrabRange
  1809. script.Parent:WaitForChild("surface")
  1810. funcs = require(script.Parent.surface)
  1811.  
  1812. function gpos(part,pos,ignore)
  1813. local r = Ray.new(part.Position,(pos-part.Position).unit*999)
  1814. return workspace:FindPartOnRayWithIgnoreList(r,ignore)
  1815. end
  1816.  
  1817. tool.Equipped:connect(function (mouse)
  1818. script.Parent.Handle.Anchored = false
  1819. local player = game.Players.LocalPlayer
  1820. local grabbed_object = nil
  1821. model.Name = player.Name.."'s Portals"
  1822. local canTeleport = true
  1823.  
  1824. function getModelMass(model)
  1825. if model == nil then return 0 end
  1826. local mass = 0
  1827. local function getModelMass(m)
  1828. for i,v in pairs(m:GetChildren()) do
  1829. if v:IsA("BasePart") then
  1830. mass = mass + v:GetMass()
  1831. elseif v:IsA("Model") then
  1832. getModelMass(v)
  1833. end
  1834. end
  1835. end
  1836. getModelMass(model)
  1837. return mass
  1838. end
  1839.  
  1840. function telePortal(hit, blue)
  1841. if hit == grabbed_object then
  1842. grabbed_object.Grab:Destroy()
  1843. grabbed_object = nil
  1844. end
  1845. if model:findFirstChild("BluePortal") and model:findFirstChild("RedPortal") then
  1846. if hit.Parent and hit.Parent ~= workspace and hit.Anchored == false then
  1847. if getModelMass(hit.Parent) > 60 then return else
  1848. if hit.Parent:findFirstChild("Torso") then
  1849. hit = hit.Parent.Torso
  1850. end
  1851. end
  1852. else
  1853. if hit:getMass() > 60 or hit.Anchored then return end
  1854. end
  1855.  
  1856. local this
  1857. local other
  1858.  
  1859. if blue then
  1860. this = model.BluePortal
  1861. other = model.RedPortal
  1862. else
  1863. this = model.RedPortal
  1864. other = model.BluePortal
  1865. end
  1866.  
  1867. local x = math.abs(hit.Velocity.x)
  1868. local y = math.abs(hit.Velocity.y)
  1869. local z = math.abs(hit.Velocity.z)
  1870.  
  1871. local main = 0
  1872. if x > y and x > z then
  1873. main = x
  1874. elseif y > x and y > z then
  1875. main = y
  1876. elseif z > x and z > y then
  1877. main = z
  1878. end
  1879. main = math.ceil(main)
  1880. local dir = other.CFrame.lookVector
  1881. local spawn = other.CFrame.p + (dir*3)
  1882. hit.CFrame = CFrame.new(spawn, spawn+dir*2)
  1883. hit.Velocity = dir*main*pp.Value
  1884. end
  1885. end
  1886.  
  1887. function makePortal(pos, hit, blue)
  1888. local p = Instance.new("Part", model)
  1889. if blue then p.Name = "BluePortal" else p.Name = "RedPortal" end
  1890. if blue then p.BrickColor = colora else p.BrickColor = colorb end
  1891. p.Material = Enum.Material.Neon
  1892. p.FormFactor = Enum.FormFactor.Custom
  1893. p.Size = Vector3.new(4,6,3)
  1894. p.TopSurface = 0
  1895. p.BottomSurface = 0
  1896. p.Anchored = true
  1897. local p2 = Instance.new("Part", model)
  1898. p2.Size = Vector3.new(0.2,0.2,0.2)
  1899. p2.CanCollide = false
  1900. p2.TopSurface = 0
  1901. p2.BottomSurface = 0
  1902. p2.BrickColor = p.BrickColor
  1903. if blue then
  1904. p2.Name = "BP"
  1905. else
  1906. p2.Name = "RP"
  1907. end
  1908. local sm2 = Instance.new("SpecialMesh", p2)
  1909. sm2.Scale = Vector3.new(0.45, 0.3, 0.0018)
  1910. sm2.MeshId = "rbxassetid://431119824"
  1911. local sm = Instance.new("SpecialMesh",p)
  1912. sm.MeshType = "Sphere"
  1913. sm.Scale = Vector3.new(1,1,0.01)
  1914. p.CanCollide = false
  1915. local dir = funcs.getSide(hit,funcs.surface(hit,pos))
  1916. p.CFrame = CFrame.new(pos, pos + dir)
  1917. p2.CFrame = p.CFrame * CFrame.Angles(0,0,math.pi/2)
  1918. funcs.weld(p2,p)
  1919. if hit.Anchored == false then
  1920. local pos = p.CFrame:inverse() * hit.CFrame
  1921. funcs.weld(p,hit)
  1922. p.Anchored = false
  1923. p.ChildRemoved:connect(function (c)
  1924. if c.Name == "Weld" then
  1925. p:Destroy()
  1926. p2:Destroy()
  1927. end
  1928. end)
  1929. end
  1930. p.Touched:connect(funcs.debounce(function (h) if canTeleport then canTeleport = false telePortal(h,blue) wait(.1) canTeleport = true end end))
  1931. end
  1932.  
  1933. function firePortal(origin,dir,blue,chit,target)
  1934. local p = Instance.new("Part", game.Workspace)
  1935. p.FormFactor = Enum.FormFactor.Custom
  1936. p.Size = Vector3.new(.1,.1,.1)
  1937. p.TopSurface = 0
  1938. p.BottomSurface = 0
  1939. if blue then
  1940. p.BrickColor = colora
  1941. else
  1942. p.BrickColor = colorb
  1943. end
  1944. p.Material = Enum.Material.Neon
  1945. local sm = Instance.new("SpecialMesh",p)
  1946. sm.MeshType = "Sphere"
  1947. sm.Scale = Vector3.new(10,10,10)
  1948. p.Reflectance = 1
  1949. local bf = Instance.new("BodyForce",p)
  1950. bf.force = Vector3.new(0,196.2,0)*p:GetMass()
  1951. p.Velocity = dir*200
  1952. p.CFrame = CFrame.new(origin,origin+dir)
  1953. p:BreakJoints()
  1954. tool.Fire:Play()
  1955. funcs.debounce(p.Touched:connect(function (h)
  1956. if blue and target then
  1957. if model:FindFirstChild("BluePortal") then model.BluePortal:Destroy() end
  1958. if model:FindFirstChild("BP") then model.BP:Destroy() end
  1959. makePortal(chit,target,true)
  1960.  
  1961. elseif not blue and target then
  1962. if model:FindFirstChild("RedPortal") then model.RedPortal:Destroy() end
  1963. if model:FindFirstChild("RP") then model.RP:Destroy() end
  1964. makePortal(chit,target,false)
  1965. end
  1966. p:Destroy()
  1967. end))
  1968. debris:AddItem(p,120)
  1969. end
  1970.  
  1971. funcs.debounce(mouse.Button2Down:connect(function ()
  1972. timestart = false
  1973. wait(cw.Value)
  1974. timestart = true
  1975. end))
  1976.  
  1977. funcs.debounce(mouse.Button1Down:connect(function ()
  1978. local dir = (mouse.Hit.p - player.Character.Head.Position).unit
  1979. local origin = player.Character.Head.Position + dir*5
  1980. local block, pos = gpos(tool.Handle,mouse.Hit.p,{tool.Parent,model,grabbed_object})
  1981. firePortal(origin,dir,true,pos,block)
  1982. end))
  1983.  
  1984. funcs.debounce(mouse.Button2Up:connect(function ()
  1985. if timestart then return end
  1986. local dir = (mouse.Hit.p - player.Character.Head.Position).unit
  1987. local origin = player.Character.Head.Position + dir*5
  1988. local block, pos = gpos(tool.Handle,mouse.Hit.p,{tool.Parent,model,grabbed_object})
  1989. firePortal(origin,dir,false,pos,block)
  1990. end))
  1991.  
  1992. funcs.debounce(mouse.KeyDown:connect(function (k)
  1993. local mt = mouse.Target
  1994. if mt then
  1995. if k == "e" and cg.Value then
  1996. if grabbed_object == nil and (mt.Position - tool.Handle.Position).magnitude < gr.Value then
  1997. if mt:getMass() > gp.Value then return end
  1998. mt.CFrame = tool.Handle.CFrame * CFrame.new(0,6,0)
  1999. local w = funcs.weld(mt, tool.Handle)
  2000. w.Name = "Grab"
  2001. grabbed_object = mt
  2002. elseif grabbed_object then
  2003. grabbed_object.Grab:Destroy()
  2004. grabbed_object.Velocity = tool.Parent.Torso.CFrame.lookVector*100
  2005. grabbed_object = nil
  2006. end
  2007. end
  2008. end
  2009.  
  2010. if k == "r" then
  2011. model:ClearAllChildren()
  2012. end
  2013. end))
  2014.  
  2015. local event = workspace.ChildRemoved:connect(function (c)
  2016. if c == model then
  2017. model = Instance.new("Model", workspace)
  2018. model.Name = player.Name.."'s Portals"
  2019. end
  2020. end)
  2021.  
  2022. player.Character.Humanoid.Died:connect(function ()
  2023. event:disconnect()
  2024. model:Destroy()
  2025. end)
  2026. end)
  2027.  
  2028. tool.Unequipped:connect(function ()
  2029. if tool.Parent == game.Workspace then
  2030. model:Destroy()
  2031. model = Instance.new("Model", workspace)
  2032. end
  2033. end)
  2034. end))
  2035. Configuration35.Name = "Settings"
  2036. Configuration35.Parent = Tool32
  2037. NumberValue36.Name = "PortalPower"
  2038. NumberValue36.Parent = Configuration35
  2039. NumberValue36.Value = 1
  2040. NumberValue37.Name = "CameraWait"
  2041. NumberValue37.Parent = Configuration35
  2042. NumberValue37.Value = 0.65
  2043. BoolValue38.Name = "CanGrab"
  2044. BoolValue38.Parent = Configuration35
  2045. BoolValue38.Value = true
  2046. NumberValue39.Name = "GrabPower"
  2047. NumberValue39.Parent = Configuration35
  2048. NumberValue39.Value = 100
  2049. NumberValue40.Name = "GrabRange"
  2050. NumberValue40.Parent = Configuration35
  2051. NumberValue40.Value = 5
  2052. Sound41.Name = "Fire"
  2053. Sound41.Parent = Tool32
  2054. Sound41.SoundId = "rbxassetid://142774034"
  2055. LocalScript42.Name = "MouseIcon"
  2056. LocalScript42.Parent = Tool32
  2057. LocalScript42.Disabled = true
  2058. table.insert(cors,sandbox(LocalScript42,function()
  2059. local MOUSE_ICON = 'rbxassetid://120192974' local Tool = script.Parent
  2060. local Mouse = nil local function UpdateIcon()
  2061. if Mouse then Mouse.Icon = Tool.Enabled and MOUSE_ICON end end local function OnEquipped(mouse) Mouse = mouse UpdateIcon() end local function OnChanged(property)
  2062. if property == 'Enabled' then UpdateIcon() end end Tool.Equipped:connect(OnEquipped) Tool.Changed:connect(OnChanged)
  2063.  
  2064. end))
  2065. for i,v in pairs(mas:GetChildren()) do
  2066. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  2067. pcall(function() v:MakeJoints() end)
  2068. end
  2069. mas:Destroy()
  2070. for i,v in pairs(cors) do
  2071. spawn(function()
  2072. pcall(v)
  2073. end)
  2074. end
Add Comment
Please, Sign In to add comment