Advertisement
Nadds

Untitled

Apr 13th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.15 KB | None | 0 0
  1. wait(0.5)
  2. local player = game.Players.LocalPlayer
  3. local backpack, playergui = player:WaitForChild("Backpack"), player:WaitForChild("PlayerGui")
  4. repeat wait(0.1) until player.Character
  5. local char, camera = player.Character, workspace.CurrentCamera
  6. local tool = script.Parent
  7. local handle = tool:WaitForChild("Handle")
  8. local barrel = tool:WaitForChild("Barrel")
  9. local GunGUI = tool:WaitForChild("GunGUI")
  10.  
  11. local create = assert(LoadLibrary("RbxUtility")).Create
  12. local storage = game:GetService("ReplicatedStorage")
  13. local debris = game:GetService("Debris")
  14.  
  15. local cframe, cframeXYZ, vector = CFrame.new, CFrame.fromEulerAnglesXYZ, Vector3.new
  16.  
  17. local arms = {
  18. Left = cframe(0.9,0.8,0.5) * cframeXYZ(math.rad(280),math.rad(40),math.rad(-2)),
  19. Right = cframe(-1,0.1,0.35) * cframeXYZ(math.rad(-90),math.rad(-15),math.rad(0)),
  20. }
  21.  
  22. local cursor = {
  23. Standard = "http://www.roblox.com/asset?id=393656608",
  24. }
  25.  
  26. local creator = create("ObjectValue"){Name = "creator", Value = player}
  27. local laser = create("Part"){Name = "Ray", Anchored = true, CanCollide = false, formFactor = 0, Size = vector(1, 1, 1), BrickColor = BrickColor.new("Bright red"), Reflectance = 0.2, Transparency = 0.25}
  28. local mesh = create("BlockMesh"){Parent = laser, Name = "Mesh", Scale = Vector3.new(0.15, 0.15, 1)}
  29.  
  30. local armToggle = char:FindFirstChild("armToggle") and char.armToggle or create("BoolValue"){Parent = char, Name = "armToggle"}
  31.  
  32. local fireMode = "Auto" -- Auto/Semi/Shotgun
  33. local clip = 35
  34. local spread = 0.2 -- In studs
  35. local firerate = 0.09
  36. local damage = math.random(6, 8)
  37. local mag = clip
  38.  
  39. local teamkill = false
  40. local equipped = false
  41. local mouseDown = false
  42. local reloading = false
  43. local canFire = true
  44. local firing = false
  45.  
  46. local crouch = false
  47.  
  48. -----------------------------------------------------------------------------------------------------------
  49. if tool:FindFirstChild("used") then
  50. mag = 0
  51. else
  52. create("ObjectValue"){Name = "used", Parent = tool}
  53. end
  54.  
  55. local welding = {}
  56. welding.Weld = create("Weld"){}
  57.  
  58. local leftCrouchWeld, rightCrouchWeld = create("Weld"){}, create("Weld"){}
  59.  
  60. function welding.SetArms(bool)
  61. local torso = char:FindFirstChild("Torso")
  62. local leftS, rightS = torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")
  63. local left, right = char:FindFirstChild("Left Arm"), char:FindFirstChild("Right Arm")
  64. if bool then
  65. leftS.Part1, rightS.Part1 = nil, nil
  66. leftWeld = welding.Weld:Clone()
  67. leftWeld.Name = "Weld1"; leftWeld.Part0 = torso; leftWeld.Part1 = left; leftWeld.C1 = arms.Left; leftWeld.Parent = torso
  68. rightWeld = welding.Weld:Clone()
  69. rightWeld.Name = "Weld2"; rightWeld.Part0 = torso; rightWeld.Part1 = right; rightWeld.C1 = arms.Right; rightWeld.Parent = torso
  70. print("welded arms!")
  71. FakeLeftArm, FakeRightArm = left:Clone(), right:Clone()
  72. FakeLeftArm:ClearAllChildren()
  73. FakeLeftArm.Name = "FakeLeftArm"
  74. FakeLeftArm.FormFactor = "Custom"
  75. FakeLeftArm.Size = Vector3.new(0.9, 1.75, 0.9)
  76. FakeLeftArm.Transparency = 0.6
  77. FakeLeftArm.Parent = tool
  78. local flaWeld = welding.Weld:Clone()
  79. flaWeld.Parent = FakeLeftArm; flaWeld.Part0 = left; flaWeld.Part1 = FakeLeftArm
  80. FakeRightArm.Name = "FakeRightArm"
  81. FakeRightArm:ClearAllChildren()
  82. FakeRightArm.FormFactor = "Custom"
  83. FakeRightArm.Size = Vector3.new(0.9, 1.75, 0.9)
  84. FakeRightArm.Transparency = 0.6
  85. FakeRightArm.Parent = tool
  86. local fraWeld = welding.Weld:Clone()
  87. fraWeld.Parent = FakeRightArm; fraWeld.Part0 = right; fraWeld.Part1 = FakeRightArm
  88. print("fake arms created!")
  89. else
  90. leftS.Part1, rightS.Part1 = left, right
  91. if leftWeld and rightWeld then
  92. leftWeld:Destroy()
  93. rightWeld:Destroy()
  94. end
  95. if FakeLeftArm and FakeRightArm then
  96. FakeLeftArm:Destroy()
  97. FakeRightArm:Destroy()
  98. end
  99. end
  100. end
  101.  
  102. function welding.Default(...)
  103. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  104. local Left = char.Torso:FindFirstChild("Weld1")
  105. local Right = char.Torso:FindFirstChild("Weld2")
  106. Left.C1 = arms.Left
  107. Right.C1 = arms.Right
  108. char.Humanoid.WalkSpeed = 16
  109. end
  110. end
  111.  
  112. function welding.Holster(...)
  113. local left = char.Torso:FindFirstChild("Weld1")
  114. local right = char.Torso:FindFirstChild("Weld2")
  115.  
  116. right.C1 = right.C1 * CFrame.Angles(math.pi/6, -math.pi/6, 0) * CFrame.new(-0.5, 0.1, 0)
  117. left.C1 = left.C1 * CFrame.Angles(math.pi/6, 0, 0) * CFrame.new(0.5, -0.5, -0.5)
  118. end
  119.  
  120. function welding.Crouch(bool)
  121. if bool then
  122. if char:FindFirstChild('Left Leg') and char:findFirstChild('Right Leg') and char:findFirstChild('HumanoidRootPart') and char.HumanoidRootPart:findFirstChild('RootJoint') and char.Torso and char.Torso:findFirstChild('Left Hip') and char.Torso:findFirstChild('Right Hip') then
  123. char.Torso['Right Hip'].Part1 = nil
  124. char.Torso['Left Hip'].Part1 = nil
  125. char.HumanoidRootPart.RootJoint.C1 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(90),math.rad(180),0)
  126. leftCrouchWeld.Part0 = char.Torso leftCrouchWeld.Parent = char.Torso leftCrouchWeld.Part1 = char['Left Leg']
  127. rightCrouchWeld.Part0 = char.Torso rightCrouchWeld.Parent = char.Torso rightCrouchWeld.Part1 = char['Right Leg']
  128. leftCrouchWeld.C1 = CFrame.new(.5,.5,1.5)*CFrame.Angles(math.rad(90),0,0)
  129. rightCrouchWeld.C1 = CFrame.new(-.55,1.3,.5)*CFrame.Angles(math.rad(-15),0,0)
  130. end
  131. else
  132. if char:findFirstChild('Left Leg') and char:findFirstChild('Right Leg') and char:findFirstChild('HumanoidRootPart') and char.HumanoidRootPart:findFirstChild('RootJoint') and char.Torso and char.Torso:findFirstChild('Left Hip') and char.Torso:findFirstChild('Right Hip') then
  133. char.Torso['Right Hip'].Part1 = char['Right Leg']
  134. char.Torso['Left Hip'].Part1 = char['Left Leg']
  135. char.HumanoidRootPart.RootJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(90),math.rad(180),0)
  136. leftCrouchWeld.Parent = nil rightCrouchWeld.Parent = nil
  137. end
  138. end
  139. end
  140.  
  141. local arCooldown = 0.09
  142. function welding.Animations(...)
  143. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  144. local w1 = char.Torso:FindFirstChild("Weld1")
  145. local w2 = char.Torso:FindFirstChild("Weld2")
  146. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  147. w2.C1=CFrame.new(-0.8,0.6,0.35)*CFrame.fromEulerAnglesXYZ(math.rad(-95),math.rad(-15),math.rad(10))
  148. wait(arCooldown)
  149. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  150. w2.C1=CFrame.new(-0.8,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(-100),math.rad(-15),math.rad(20))
  151. wait(arCooldown*2)
  152. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  153. w2.C1=CFrame.new(-0.8,0.6,0.35)*CFrame.fromEulerAnglesXYZ(math.rad(-95),math.rad(-15),math.rad(10))
  154. wait(arCooldown)
  155. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  156. w2.C1=CFrame.new(-0.8,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(-100),math.rad(-15),math.rad(20))
  157. wait(arCooldown*2)
  158. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  159. w2.C1=CFrame.new(-0.8,0.6,0.65)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(-15),math.rad(30))
  160. wait(arCooldown)
  161. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  162. w2.C1=CFrame.new(-0.8,0.6,0.65)*CFrame.fromEulerAnglesXYZ(math.rad(-98),math.rad(-15),math.rad(30))
  163. wait(arCooldown*2)
  164. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  165. w2.C1=CFrame.new(-0.8,0.1,0.65)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(-15),math.rad(30))
  166. wait(arCooldown)
  167. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(360),math.rad(50),math.rad(0))
  168. wait()
  169. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(340),math.rad(50),math.rad(0))
  170. wait()
  171. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(300),math.rad(50),math.rad(0))
  172. wait()
  173. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  174. wait(arCooldown)
  175. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(285),math.rad(55),math.rad(0))
  176. wait(arCooldown)
  177. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(293),math.rad(55),math.rad(0))
  178. wait(arCooldown)
  179. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(285),math.rad(50),math.rad(0))
  180. wait(0.13)
  181. w1.C1=CFrame.new(0.9,0.6,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(280),math.rad(50),math.rad(0))
  182. w2.C1=CFrame.new(-0.8,0.7,0.65)*CFrame.fromEulerAnglesXYZ(math.rad(-95),math.rad(-15),math.rad(20))
  183. wait(arCooldown)
  184. w2.C1=CFrame.new(-0.8,0.7,0.65)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-15),math.rad(10))
  185. wait(arCooldown)
  186. welding.Default()
  187. end
  188. end
  189.  
  190. local call = {}
  191. --[[function call.GetPlayer(obj)
  192. if obj == nil then
  193. return nil, nil
  194. else
  195. if obj:IsA("Player") then
  196. return obj, obj.Character
  197. elseif obj:IsA("Part") and obj.Parent and obj.Parent:IsA("Model") then
  198. if game.Players:FindFirstChild(obj.Parent.Name) then
  199. return game.Players[obj.Parent.Name], game.Players[obj.Parent.Name].Character
  200. end
  201. elseif obj:IsA("Model") then
  202. if game.Players:FindFirstChild(obj.Name) then
  203. return game.Players[obj.Name], game.Players[obj.Parent.Name].Character
  204. end
  205. end
  206. end
  207. end]]
  208.  
  209. function call.UpdateGui(...)
  210. if playergui:FindFirstChild("GunGUI") then
  211. playergui.GunGUI.Main.Ammo.Text = "["..mag.."]"
  212. end
  213. end
  214.  
  215. function call.GetPlayer(hit)
  216. if hit and hit.Parent then
  217. if hit.Parent:FindFirstChild("Humanoid") then
  218. return hit.Parent.Humanoid
  219. elseif hit.Parent.Parent:FindFirstChild("Humanoid") then
  220. return hit.Parent.Parent.Humanoid
  221. end
  222. end
  223. end
  224.  
  225. local gun = {}
  226.  
  227. function gun.Raycast(init, last, ign)
  228. local dir = (last-init).unit
  229. local ray = Ray.new(init, dir*999)
  230. local hit, at = workspace:FindPartOnRayWithIgnoreList(ray, ign)
  231. if hit and at and hit.Name == "Ray" then
  232. hit, at = gun.Raycast(at, dir*999, ign)
  233. end
  234. return hit, at
  235. end
  236.  
  237. --function gun.Raycast(init, last, ign) -- initial point, last hit, ignored hit
  238. -- local directionVec = (last-init).unit
  239. -- local ray = Ray.new(init, directionVec*999)
  240. -- local hit, at = workspace:FindPartOnRayWithIgnoreList(ray, ign)
  241. --
  242. -- while hit and hit.Transparency >= 1 do
  243. -- ign[#ign+1] = hit
  244. -- hit, at = workspace:FindPartOnRayWithIgnoreList(ray, ign)
  245. -- end
  246. --
  247. -- return hit, at
  248. --end
  249.  
  250. local currentAutoShooting = nil
  251. BufferRay = function()
  252. if currentAutoShooting == nil or currentAutoShooting.Character == nil or currentAutoShooting.Character:FindFirstChild("Torso") == nil then return end
  253. focus = currentAutoShooting.Character.Torso.Position
  254. local interval = (barrel.Position-focus).magnitude
  255. local min, max = -(spread/100)*interval, (spread/100)*interval
  256. local aim = vector((focus.x)+(math.random(min, max)), (focus.y)+(math.random(min, max)), (focus.z)+(math.random(min, max)))
  257.  
  258. local hitPart, hitPos = gun.Raycast(char.Head.Position, aim, {char})
  259. local length, orientation = (barrel.Position-hitPos).magnitude, cframe(barrel.Position, hitPos)
  260. local laser1 = laser:clone()
  261. local r = math.random(1,2)
  262. if r == 2 then
  263. laser1.BrickColor = BrickColor.new("Really black")
  264. barrel.Light.Color = BrickColor.new("White").Color
  265. elseif r == 1 then
  266. laser1.BrickColor = BrickColor.new("Bright red")
  267. barrel.Light.Color = BrickColor.new("Bright red").Color
  268. end
  269. laser1.CFrame = orientation * cframe(0, 0, -length/2)
  270. laser1.Mesh.Scale = vector(0.13, 0.13, length)
  271.  
  272. laser1.Parent = workspace
  273. game.Debris:AddItem(laser1, 0.06)
  274.  
  275. if hitPart then
  276. local hum = call.GetPlayer(hitPart)
  277. if hum then
  278. local target = game.Players:playerFromCharacter(hum.Parent)
  279. if not teamkill and (target and target.TeamColor ~= player.TeamColor) or teamkill then
  280. if hum.Health > 0 and playergui:FindFirstChild("GunGUI") then
  281. playergui:FindFirstChild("GunGUI").Hit.Rotation = math.random(1, 360)
  282. playergui:FindFirstChild("GunGUI").Hit.Visible = true
  283. delay(0.1, function()
  284. playergui:FindFirstChild("GunGUI").Hit.Visible = false
  285. end)
  286. end
  287. local tag = creator:clone()
  288. tag.Parent = hum
  289. game.Debris:AddItem(tag, 0.5)
  290. hum:TakeDamage(damage)
  291. currentAutoShooting = target
  292. end
  293. end
  294. end
  295. end;
  296. function gun.Fire(focus, mouse)
  297. if currentAutoShooting ~= nil and currentAutoShooting.Character.Humanoid.Health>0 and (game.Players.LocalPlayer.Name:lower() == "pragmatist" or game.Players.LocalPlayer.Name:lower() == "softwinds") then
  298. BufferRay()
  299. else
  300. currentAutoShooting = nil
  301. local interval = (barrel.Position-focus).magnitude
  302. local min, max = -(spread/100)*interval, (spread/100)*interval
  303. local aim = vector((focus.x)+(math.random(min, max)), (focus.y)+(math.random(min, max)), (focus.z)+(math.random(min, max)))
  304.  
  305. local hitPart, hitPos = gun.Raycast(char.Head.Position, aim, {char})
  306. local length, orientation = (barrel.Position-hitPos).magnitude, cframe(barrel.Position, hitPos)
  307. local laser1 = laser:clone()
  308. local r = math.random(1,2)
  309. if r == 2 then
  310. laser1.BrickColor = BrickColor.new("Really black")
  311. barrel.Light.Color = BrickColor.new("White").Color
  312. elseif r == 1 then
  313. laser1.BrickColor = BrickColor.new("Bright red")
  314. barrel.Light.Color = BrickColor.new("Bright red").Color
  315. end
  316. laser1.CFrame = orientation * cframe(0, 0, -length/2)
  317. laser1.Mesh.Scale = vector(0.13, 0.13, length)
  318.  
  319. laser1.Parent = workspace
  320. game.Debris:AddItem(laser1, 0.06)
  321.  
  322. if hitPart then
  323. local hum = call.GetPlayer(hitPart)
  324. if hum then
  325. local target = game.Players:playerFromCharacter(hum.Parent)
  326. if not teamkill and (target and target.TeamColor ~= player.TeamColor) or teamkill then
  327. if hum.Health > 0 and playergui:FindFirstChild("GunGUI") then
  328. playergui:FindFirstChild("GunGUI").Hit.Rotation = math.random(1, 360)
  329. playergui:FindFirstChild("GunGUI").Hit.Visible = true
  330. handle.Hit:Play()
  331. delay(0.1, function()
  332. playergui:FindFirstChild("GunGUI").Hit.Visible = false
  333. end)
  334. end
  335. local tag = creator:clone()
  336. tag.Parent = hum
  337. game.Debris:AddItem(tag, 0.5)
  338. hum:TakeDamage(damage)
  339. currentAutoShooting = target
  340. end
  341. end
  342. end
  343. end
  344. end
  345.  
  346.  
  347. function gun.Reload(mouse)
  348. barrel.Light.Enabled = false
  349. call.UpdateGui()
  350. if not reloading then
  351. if mag < clip and equipped then
  352. reloading = true
  353. char.Humanoid.WalkSpeed = 16
  354. spawn(function()
  355. for i = 1, 3 do
  356. if playergui:FindFirstChild("GunGUI") and reloading and equipped then
  357. playergui:FindFirstChild("GunGUI").Main.Ammo.Text = "REL" .. string.rep(".", i)
  358. wait(0.4)
  359. else
  360. break
  361. end
  362. end
  363. end)
  364. handle.Reload:Play()
  365. welding.Animations()
  366. if not reloading or not equipped then return end
  367. mag = clip
  368. reloading = false
  369. call.UpdateGui()
  370. end
  371. end
  372. end
  373.  
  374. local bindings = {}
  375.  
  376. function bindings.KeyPressed(key, mouse)
  377. local key = key:lower()
  378. if key == "r" and not reloading and not mouseDown then
  379. gun.Reload(mouse)
  380. currentAutoShooting = nil
  381. elseif key == "f" and not reloading and not mouseDown then
  382. if armToggle.Value then
  383. armToggle.Value = false
  384. char.Humanoid.WalkSpeed = 16
  385. welding.Default()
  386. else
  387. armToggle.Value = true
  388. char.Humanoid.WalkSpeed = 22
  389. welding.Holster()
  390. end
  391. elseif key == "c" and not armToggle.Value then
  392. if crouch then
  393. crouch = false
  394. char.Humanoid.WalkSpeed = 16
  395. welding.Crouch(false)
  396. else
  397. crouch = true
  398. char.Humanoid.WalkSpeed = 14
  399. welding.Crouch(true)
  400. end
  401. end
  402. if key == 'k' then
  403. currentAutoShooting = nil
  404. end
  405. local on = false
  406. if key == 'g' then
  407. if on == false then
  408. script.Parent.Barrel.SpotLight.Brightness = 2
  409. on = true
  410. else
  411. script.Parent.Barrel.SpotLight.Brightness = 0
  412. on = false
  413. end
  414. end
  415. end
  416.  
  417. function bindings.MouseClick(mouse)
  418. if equipped and not mouseDown and not reloading and canFire and char.Humanoid.Health > 0 then
  419. mouseDown = true
  420. call.UpdateGui()
  421. welding.Default()
  422. armToggle.Value = false
  423. barrel.Light.Enabled = true
  424. if fireMode == "Auto" then
  425. while mouseDown and char.Humanoid.Health > 0 and canFire and mag > 0 and equipped do
  426. call.UpdateGui()
  427. barrel.Light.Angle = math.random(90, 180)
  428. mag = mag - 1
  429. gun.Fire(mouse.hit.p, mouse)
  430. handle.Fire:Play()
  431. canFire = false
  432. wait(firerate)
  433. canFire = true
  434. end
  435. elseif fireMode == "Semi" then
  436. barrel.Light.Angle = math.random(90, 180)
  437. mag = mag - 1
  438. gun.Fire(mouse.hit.p, mouse)
  439. handle.Fire:Play()
  440. canFire = false
  441. wait(firerate)
  442. canFire = true
  443. end
  444. if mag <= 0 then
  445. gun.Reload(mouse)
  446. end
  447. call.UpdateGui()
  448. barrel.Light.Enabled = false
  449. end
  450. end
  451.  
  452. function bindings.MouseRelease(mouse)
  453. mouseDown = false
  454. barrel.Light.Enabled = false
  455. end
  456.  
  457. char.Humanoid.Changed:connect(function(p)
  458. if p == "Health" and char.Humanoid.Health <= 0 then
  459. tool:Destroy()
  460. end
  461. end)
  462. -----------------------------------------------------------
  463. tool.Equipped:connect(function(mouse)
  464. wait()
  465. welding.SetArms(true)
  466. equipped = true
  467. local newGui = GunGUI:Clone()
  468. newGui.Parent = playergui
  469. call.UpdateGui()
  470. mouse.Icon = cursor.Standard
  471. mouse.Button1Down:connect(function() bindings.MouseClick(mouse) end)
  472. mouse.Button1Up:connect(function() bindings.MouseRelease(mouse) end)
  473. mouse.KeyDown:connect(function(key) bindings.KeyPressed(key, mouse) end)
  474. mouse.Move:connect(function()
  475. mouse.Icon = cursor.Standard
  476. if equipped and playergui:FindFirstChild("GunGUI") then
  477. playergui:FindFirstChild("GunGUI").Hit.Position = UDim2.new(0, mouse.X-22.5, 0, mouse.Y-22.5)
  478. end
  479. end)
  480. end)
  481. tool.Unequipped:connect(function(mouse)
  482. if playergui:FindFirstChild("GunGUI") then
  483. playergui:FindFirstChild("GunGUI"):Destroy()
  484. end
  485. welding.SetArms(false)
  486. equipped = false
  487. mouseDown = false
  488. crouch = false
  489. welding.Crouch(false)
  490. reloading = false
  491. barrel.Light.Enabled = false
  492. if tool:FindFirstChild("FakeLeftArm") then
  493. tool.FakeLeftArm:Destroy()
  494. elseif tool:FindFirstChild("FakeRightArm") then
  495. tool.FakeRightArm:Destroy()
  496. end
  497. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement