Advertisement
ManlyMemeScripter

Golden tactical Shotgun

Mar 7th, 2018
1,927
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.80 KB | None | 0 0
  1. -- Objects
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local TextButton = Instance.new("TextButton")
  5.  
  6. -- Properties
  7.  
  8. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  9.  
  10. TextButton.Parent = ScreenGui
  11. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  12. TextButton.Size = UDim2.new(0, 170, 0, 50)
  13. TextButton.Font = Enum.Font.SourceSans
  14. TextButton.FontSize = Enum.FontSize.Size18
  15. TextButton.Text = "uh no"
  16. TextButton.TextSize = 18
  17.  
  18. --[[Function/s being made!]]
  19. function PlayMusic(ID)
  20. for i, v in pairs (game.Workspace:GetChildren()) do
  21. if v:IsA("Sound") then
  22. end
  23. end
  24. local music = Instance.new("Sound")
  25. local asset = "rbxassetid://"
  26. music.SoundId = asset .. ID
  27. music.Parent = workspace
  28. music.Volume = 999
  29. music.Looped = false
  30. music:Play()
  31. end
  32. --[[Connecting functions!]]
  33. TextButton.MouseButton1Down:connect(function()
  34. PlayMusic(1214655510)
  35. end)
  36.  
  37. -- Objects
  38.  
  39. local ScreenGui = Instance.new("ScreenGui")
  40. local TextButton = Instance.new("TextButton")
  41.  
  42. -- Properties
  43.  
  44. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  45.  
  46. TextButton.Parent = ScreenGui
  47. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  48. TextButton.Size = UDim2.new(0, 140, 0, 50)
  49. TextButton.Font = Enum.Font.SourceSans
  50. TextButton.FontSize = Enum.FontSize.Size14
  51. TextButton.Text = "Scout"
  52. TextButton.TextSize = 14
  53.  
  54. --[[Function/s being made!]]
  55. function PlayMusic(ID)
  56. for i, v in pairs (game.Workspace:GetChildren()) do
  57. if v:IsA("Sound") then
  58. end
  59. end
  60. local music = Instance.new("Sound")
  61. local asset = "rbxassetid://"
  62. music.SoundId = asset .. ID
  63. music.Parent = workspace
  64. music.Volume = 999
  65. music.Looped = false
  66. music:Play()
  67. end
  68. --[[Connecting functions!]]
  69. TextButton.MouseButton1Down:connect(function()
  70. PlayMusic(1245734952)
  71. end)
  72.  
  73.  
  74. -- Objects
  75.  
  76. local ScreenGui = Instance.new("ScreenGui")
  77. local TextButton = Instance.new("TextButton")
  78.  
  79. -- Properties
  80.  
  81. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  82.  
  83. TextButton.Parent = ScreenGui
  84. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  85. TextButton.Size = UDim2.new(0, 100, 0, 50)
  86. TextButton.Font = Enum.Font.SourceSans
  87. TextButton.FontSize = Enum.FontSize.Size14
  88. TextButton.Text = "hahaha"
  89. TextButton.TextSize = 14
  90.  
  91. --[[Function/s being made!]]
  92. function PlayMusic(ID)
  93. for i, v in pairs (game.Workspace:GetChildren()) do
  94. if v:IsA("Sound") then
  95. end
  96. end
  97. local music = Instance.new("Sound")
  98. local asset = "rbxassetid://"
  99. music.SoundId = asset .. ID
  100. music.Parent = workspace
  101. music.Volume = 999
  102. music.Looped = false
  103. music:Play()
  104. end
  105. --[[Connecting functions!]]
  106. TextButton.MouseButton1Down:connect(function()
  107. PlayMusic(922952351)
  108. end)
  109.  
  110. --Ugh,BOOGIE BOMB YESH.FORTNITE FUCK YEAH
  111. function sandbox(var,func)
  112. local env = getfenv(func)
  113. local newenv = setmetatable({},{
  114. __index = function(self,k)
  115. if k=="script" then
  116. return var
  117. else
  118. return env[k]
  119. end
  120. end,
  121. })
  122. setfenv(func,newenv)
  123. return func
  124. end
  125. cors = {}
  126. mas = Instance.new("Model",game:GetService("Lighting"))
  127. Tool0 = Instance.new("Tool")
  128. Part1 = Instance.new("Part")
  129. SpecialMesh2 = Instance.new("SpecialMesh")
  130. Part3 = Instance.new("Part")
  131. BillboardGui4 = Instance.new("BillboardGui")
  132. Script5 = Instance.new("Script")
  133. ImageLabel6 = Instance.new("ImageLabel")
  134. CylinderMesh7 = Instance.new("CylinderMesh")
  135. Part8 = Instance.new("Part")
  136. Weld9 = Instance.new("Weld")
  137. Weld10 = Instance.new("Weld")
  138. Weld11 = Instance.new("Weld")
  139. BlockMesh12 = Instance.new("BlockMesh")
  140. IntValue13 = Instance.new("IntValue")
  141. IntValue14 = Instance.new("IntValue")
  142. StringValue15 = Instance.new("StringValue")
  143. BoolValue16 = Instance.new("BoolValue")
  144. Script17 = Instance.new("Script")
  145. LocalScript18 = Instance.new("LocalScript")
  146. SpecialMesh19 = Instance.new("SpecialMesh")
  147. SpecialMesh20 = Instance.new("SpecialMesh")
  148. LocalScript21 = Instance.new("LocalScript")
  149. LocalScript22 = Instance.new("LocalScript")
  150. LocalScript23 = Instance.new("LocalScript")
  151. LocalScript24 = Instance.new("LocalScript")
  152. ScreenGui25 = Instance.new("ScreenGui")
  153. Frame26 = Instance.new("Frame")
  154. TextButton27 = Instance.new("TextButton")
  155. TextButton28 = Instance.new("TextButton")
  156. TextButton29 = Instance.new("TextButton")
  157. TextButton30 = Instance.new("TextButton")
  158. Script31 = Instance.new("Script")
  159. LocalScript32 = Instance.new("LocalScript")
  160. Sound33 = Instance.new("Sound")
  161. Sound34 = Instance.new("Sound")
  162. StringValue35 = Instance.new("StringValue")
  163. Tool0.Name = "Tactical Shotgun"
  164. Tool0.Parent = mas
  165. Part1.Parent = Tool0
  166. Part1.BrickColor = BrickColor.new("Bright bluish green")
  167. Part1.Anchored = true
  168. Part1.FormFactor = Enum.FormFactor.Custom
  169. Part1.Size = Vector3.new(0.510000467, 1.18000245, 1.34999704)
  170. Part1.CFrame = CFrame.new(6.70000076, 0.590013027, -9.69999599, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  171. Part1.Color = Color3.new(0, 0.560784, 0.611765)
  172. Part1.Position = Vector3.new(6.70000076, 0.590013027, -9.69999599)
  173. Part1.Color = Color3.new(0, 0.560784, 0.611765)
  174. SpecialMesh2.Parent = Part1
  175. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1489994942"
  176. SpecialMesh2.Scale = Vector3.new(0.25, 0.25, 0.25)
  177. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=126534866"
  178. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  179. SpecialMesh2.Scale = Vector3.new(0.25, 0.25, 0.25)
  180. Part3.Name = "Barrel"
  181. Part3.Parent = Tool0
  182. Part3.BrickColor = BrickColor.new("Really black")
  183. Part3.Transparency = 1
  184. Part3.Rotation = Vector3.new(-90, 0, 0)
  185. Part3.Anchored = true
  186. Part3.FormFactor = Enum.FormFactor.Custom
  187. Part3.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  188. Part3.CFrame = CFrame.new(6.79500008, 0.98001498, -10.4250021, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  189. Part3.BottomSurface = Enum.SurfaceType.Smooth
  190. Part3.TopSurface = Enum.SurfaceType.Smooth
  191. Part3.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  192. Part3.Position = Vector3.new(6.79500008, 0.98001498, -10.4250021)
  193. Part3.Orientation = Vector3.new(-90, 0, 0)
  194. Part3.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  195. BillboardGui4.Name = "Light"
  196. BillboardGui4.Parent = Part3
  197. BillboardGui4.Size = UDim2.new(5.29999995, 0, 5.29999995, 0)
  198. BillboardGui4.Active = true
  199. BillboardGui4.Adornee = Part3
  200. Script5.Parent = BillboardGui4
  201. table.insert(cors,sandbox(Script5,function()
  202. script.Parent.Adornee = script.Parent.Parent
  203. end))
  204. ImageLabel6.Name = "Light"
  205. ImageLabel6.Parent = BillboardGui4
  206. ImageLabel6.Transparency = 1
  207. ImageLabel6.Size = UDim2.new(1, 0, 1, 0)
  208. ImageLabel6.Visible = false
  209. ImageLabel6.BackgroundColor3 = Color3.new(0.756863, 0.752941, 0.764706)
  210. ImageLabel6.BackgroundTransparency = 1
  211. ImageLabel6.Image = "http://www.roblox.com/asset/?id=42416376"
  212.  
  213.  
  214.  
  215.  
  216.  
  217. CylinderMesh7.Parent = Part3
  218. CylinderMesh7.Scale = Vector3.new(3.9375, 3.0625, 3.62499994)
  219. CylinderMesh7.Scale = Vector3.new(3.9375, 3.0625, 3.62499994)
  220. Part8.Name = "Handle"
  221. Part8.Parent = Tool0
  222. Part8.BrickColor = BrickColor.new("Black")
  223. Part8.Transparency = 1
  224. Part8.Rotation = Vector3.new(0, 15, 0)
  225. Part8.Anchored = true
  226. Part8.FormFactor = Enum.FormFactor.Custom
  227. Part8.Size = Vector3.new(0.800000012, 0.800000012, 0.800000012)
  228. Part8.CFrame = CFrame.new(6.78499985, 0.468012989, -9.25, 0.965925634, -1.62808846e-07, 0.25881961, 1.62807055e-07, 1, 2.14409219e-08, -0.25881961, 2.14273292e-08, 0.965925634)
  229. Part8.BottomSurface = Enum.SurfaceType.Smooth
  230. Part8.TopSurface = Enum.SurfaceType.Smooth
  231. Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  232. Part8.Position = Vector3.new(6.78499985, 0.468012989, -9.25)
  233. Part8.Orientation = Vector3.new(0, 15, 0)
  234. Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  235. Weld9.Parent = Part8
  236. Weld9.C0 = CFrame.new(0, 0, 0, -1.00000191, -1.5067078e-06, -9.84804558e-08, -1.01587557e-06, 0.999997854, -2.52425416e-05, -8.14032717e-07, -2.34245799e-05, -0.999998748)
  237. Weld9.C1 = CFrame.new(0, 0, 0, -1.00000191, -1.5067078e-06, -9.84804558e-08, -1.01587557e-06, 0.999997854, -2.52425416e-05, -8.14032717e-07, -2.34245799e-05, -0.999998748)
  238. Weld9.Part0 = Part8
  239. Weld9.Part1 = Part8
  240. Weld10.Parent = Part8
  241. Weld10.C0 = CFrame.new(0, 0, 0, -1, -1.26128168e-06, 3.57787826e-07, -1.26129044e-06, 0.99999994, -2.43186951e-05, -3.57757187e-07, -2.42888927e-05, -0.99999994)
  242. Weld10.C1 = CFrame.new(0, 0, 0, -1, -1.26128168e-06, 3.57787826e-07, -1.26129044e-06, 0.99999994, -2.43186951e-05, -3.57757187e-07, -2.42888927e-05, -0.99999994)
  243. Weld10.Part0 = Part8
  244. Weld10.Part1 = Part8
  245. Weld11.Parent = Part8
  246. Weld11.C0 = CFrame.new(0, 0, 0, -0.000490181032, 0.999999642, 7.29662133e-07, 0.999998808, 0.000490319042, -0.000502735376, -0.00050124526, 4.34723916e-07, -0.999996543)
  247. Weld11.C1 = CFrame.new(0, 0, 0, -0.000490181032, 0.999999642, 7.29662133e-07, 0.999998808, 0.000490319042, -0.000502735376, -0.00050124526, 4.34723916e-07, -0.999996543)
  248. Weld11.Part0 = Part8
  249. Weld11.Part1 = Part8
  250. BlockMesh12.Parent = Part8
  251. BlockMesh12.Offset = Vector3.new(0, 0.00104166672, 0)
  252. BlockMesh12.Scale = Vector3.new(0.25, 0.0416666679, 0.0416666679)
  253. BlockMesh12.Scale = Vector3.new(0.25, 0.0416666679, 0.0416666679)
  254. IntValue13.Name = "Ammo"
  255. IntValue13.Parent = Tool0
  256. IntValue13.Value = 999
  257. IntValue14.Name = "MaxAmmo"
  258. IntValue14.Parent = Tool0
  259. IntValue14.Value = 999
  260. StringValue15.Name = "StringValue"
  261. StringValue15.Parent = Tool0
  262. BoolValue16.Name = "VisibleB"
  263. BoolValue16.Parent = Tool0
  264. Script17.Name = "WeldArm"
  265. Script17.Parent = Tool0
  266. table.insert(cors,sandbox(Script17,function()
  267. Tool = script.Parent
  268.  
  269.  
  270. local arms = nil
  271. local torso = nil
  272. local weld33 = nil -- right arm
  273. local weld55 = nil -- left arm
  274. local welds = {}
  275.  
  276.  
  277.  
  278.  
  279. colors = {26,}
  280.  
  281. function Equip(mouse)
  282. wait(0.01)
  283. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  284. torso = Tool.Parent:FindFirstChild("Torso")
  285. if arms ~= nil and torso ~= nil then
  286. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  287. if sh ~= nil then
  288. local yes = true
  289. if yes then
  290. yes = false
  291. sh[1].Part1 = nil
  292. sh[2].Part1 = nil
  293. local weld1 = Instance.new("Weld") -- left arm
  294. weld55 = weld1
  295. weld1.Part0 = torso
  296. weld1.Parent = torso
  297. weld1.Part1 = arms[1]
  298. weld1.C1 = CFrame.new(-0.35, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  299. welds[1] = weld1
  300. local weld2 = Instance.new("Weld") -- right arm
  301. weld33 = weld2
  302. weld2.Part0 = torso
  303. weld2.Parent = torso
  304. weld2.Part1 = arms[2]
  305. weld2.C1 = CFrame.new(-0.75, 0.5, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  306. welds[2] = weld2
  307.  
  308. end
  309. else
  310. print("sh")
  311. end
  312. else
  313. print("arms")
  314. end
  315. end
  316.  
  317. function Unequip(mouse)
  318. if arms ~= nil and torso ~= nil then
  319. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  320. if sh ~= nil then
  321. local yes = true
  322. if yes then
  323. yes = false
  324. sh[1].Part1 = arms[1]
  325. sh[2].Part1 = arms[2]
  326. welds[1].Parent = nil
  327. welds[2].Parent = nil
  328.  
  329. end
  330. else
  331. print("sh")
  332. end
  333. else
  334. print("arms")
  335. end
  336. end
  337. Tool.Equipped:connect(Equip)
  338. Tool.Unequipped:connect(Unequip)
  339. end))
  340. LocalScript18.Name = "Arms"
  341. LocalScript18.Parent = Tool0
  342. table.insert(cors,sandbox(LocalScript18,function()
  343. sp = script.Parent
  344.  
  345. Mesh = false -- If true will load BC 2.0 Arm meshes as well.
  346. Shirt = true -- If true will load the user's shirt to the arms as well
  347.  
  348. function onEquipped(mouse)
  349. local Player = game:GetService("Players").LocalPlayer
  350. local Cam = game.Workspace.CurrentCamera
  351.  
  352. local Arms = Instance.new("Model")
  353. Arms.Name = "Arms"
  354. Arms.Parent = Cam
  355.  
  356. if Shirt == true then
  357. local Humanoid = Instance.new("Humanoid")
  358. Humanoid.MaxHealth = 0
  359. Humanoid.Health = 0
  360. Humanoid.Name = ""
  361. Humanoid.Parent = Arms
  362.  
  363. local newShirt = Player.Character:FindFirstChild("Shirt"):clone()
  364. newShirt.Parent = Arms
  365. else end
  366.  
  367. local RightArm = Player.Character:FindFirstChild("Right Arm"):clone()
  368. RightArm.Name = "Right Arm"
  369. RightArm.Transparency = 0.1
  370.  
  371. local w = Instance.new("Weld")
  372. w.Part0 = RightArm
  373. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  374. w.C0 = CFrame.new()
  375. w.C1 = CFrame.new()
  376. w.Parent = RightArm
  377. RightArm.Parent = Arms
  378.  
  379. local LeftArm = Player.Character:FindFirstChild("Left Arm"):clone()
  380. LeftArm.Name = "Left Arm"
  381. LeftArm.Transparency = 0.1
  382.  
  383. local w = Instance.new("Weld")
  384. w.Part0 = LeftArm
  385. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  386. w.C0 = CFrame.new()
  387. w.C1 = CFrame.new()
  388. w.Parent = LeftArm
  389. LeftArm.Parent = Arms
  390.  
  391. if Mesh ~= false then
  392. local LeftArmMesh = script:FindFirstChild("LeftArm")
  393. LeftArmMesh.Parent = LeftArm
  394. local RightArmMesh = script:FindFirstChild("RightArm")
  395. RightArmMesh.Parent = RightArm
  396. else end
  397.  
  398. end
  399.  
  400. function onUnequipped(mouse)
  401. local Player = game:GetService("Players").LocalPlayer
  402. local Cam = game.Workspace.CurrentCamera
  403. for _, Model in pairs(Cam:GetChildren()) do
  404. if Model.Name == "Arms" then
  405. Model:remove()
  406. else end
  407. end
  408. end
  409.  
  410. sp.Equipped:connect(onEquipped)
  411. sp.Unequipped:connect(onUnequipped)
  412.  
  413. end))
  414. SpecialMesh19.Name = "LeftArm"
  415. SpecialMesh19.Parent = LocalScript18
  416. SpecialMesh19.MeshId = "http://www.roblox.com/asset/?id=27111419"
  417. SpecialMesh19.MeshType = Enum.MeshType.FileMesh
  418. SpecialMesh20.Name = "RightArm"
  419. SpecialMesh20.Parent = LocalScript18
  420. SpecialMesh20.MeshId = "http://www.roblox.com/asset/?id=27111864"
  421. SpecialMesh20.MeshType = Enum.MeshType.FileMesh
  422. LocalScript21.Name = "BackupWeld"
  423. LocalScript21.Parent = Tool0
  424. table.insert(cors,sandbox(LocalScript21,function()
  425. function Weld(x,y)
  426. local W = Instance.new("Weld")
  427. W.Part0 = x
  428. W.Part1 = y
  429. local CJ = CFrame.new(x.Position)
  430. local C0 = x.CFrame:inverse()*CJ
  431. local C1 = y.CFrame:inverse()*CJ
  432. W.C0 = C0
  433. W.C1 = C1
  434. W.Parent = x
  435. end
  436.  
  437. function Get(A)
  438. if A.className == "Part" then
  439. Weld(script.Parent.Handle, A)
  440. A.Anchored = false
  441. else
  442. local C = A:GetChildren()
  443. for i=1, #C do
  444. Get(C[i])
  445. end
  446. end
  447. end
  448.  
  449. function Finale()
  450. Get(script.Parent)
  451. end
  452.  
  453. script.Parent.Equipped:connect(Finale)
  454. script.Parent.Unequipped:connect(Finale)
  455. Finale()
  456. end))
  457. LocalScript22.Name = "Crouch"
  458. LocalScript22.Parent = Tool0
  459. table.insert(cors,sandbox(LocalScript22,function()
  460. on = 0
  461. Tool = script.Parent
  462. welds = {}
  463. sh = {}
  464. arms = nil
  465. torso = nil
  466. f = nil
  467. function Crouch(ison)
  468. if arms == nil and torso == nil then
  469. arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
  470. torso = Tool.Parent:FindFirstChild("Torso")
  471. end
  472. if arms ~= nil and torso ~= nil then
  473. sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
  474. if sh ~= nil then
  475. local yes = true
  476. if yes then
  477. yes = false
  478. if ison == 1 then
  479. sh[1].Part1 = nil
  480. sh[2].Part1 = nil
  481. local weld1 = Instance.new("Weld")
  482. weld1.Part0 = torso
  483. weld1.Parent = torso
  484. weld1.Part1 = arms[1]
  485. weld1.C1 = CFrame.new(-0.5, 0.75, 1)
  486. arms[1].Name = "LDave"
  487. arms[1].CanCollide = true
  488. welds[1] = weld1
  489. Tool.Parent.Humanoid.WalkSpeed = 10
  490. -------------------------------------------
  491. local weld2 = Instance.new("Weld")
  492. weld2.Part0 = torso
  493. weld2.Parent = torso
  494. weld2.Part1 = arms[2]
  495. weld2.C1 = CFrame.new(0.5,0.495,1.25) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
  496. arms[2].Name = "RDave"
  497. arms[2].CanCollide = true
  498. welds[2] = weld2
  499. ---------------------------------
  500. local force = Instance.new("BodyForce")
  501. force.Parent = torso
  502. f = force
  503. wait(0.01)
  504. elseif ison == 0 then
  505. if arms then
  506. sh[1].Part1 = arms[1]
  507. sh[2].Part1 = arms[2]
  508. f.Parent = nil
  509. arms[2].Name = "Right Leg"
  510. arms[1].Name = "Left Leg"
  511. welds[1].Parent = nil
  512. welds[2].Parent = nil
  513. Tool.Parent.Humanoid.WalkSpeed = 99
  514. end
  515. end
  516. --
  517. end
  518. else
  519. print("sh")
  520. end
  521. else
  522. print("arms")
  523. end
  524. end
  525. function Key(key)
  526. if key then
  527. key = string.lower(key)
  528. if (key=="c") then
  529. if on == 1 then
  530. on = 0
  531. elseif on == 0 then
  532. on = 1
  533. end
  534. Crouch(on)
  535. end
  536. end
  537. end
  538. function Equip(mouse)
  539. mouse.KeyDown:connect(Key)
  540. end
  541. script.Parent.Equipped:connect(Equip)
  542.  
  543.  
  544. end))
  545. LocalScript23.Name = "Crouch/Patrol"
  546. LocalScript23.Parent = Tool0
  547. table.insert(cors,sandbox(LocalScript23,function()
  548. --Note this must be used with the accompanying weld script
  549. --This is an edited version of my V3 KeyCommand Script.
  550. --Heavily edited from a free model crouch script, ~ukwarrior6~
  551.  
  552. ----------------------------
  553. --Crouch and Patrol Script--
  554. ----------------------------
  555.  
  556. on = 0
  557. Tool = script.Parent
  558. welds = {}
  559. sh = {}
  560. arms = nil
  561. torso = nil
  562. f = nil
  563. Holstered = false
  564. wait()
  565. local Tool = script.Parent
  566. enabled = true
  567.  
  568. function Crouch(ison)
  569. if arms == nil and torso == nil then
  570. arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
  571. torso = Tool.Parent:FindFirstChild("Torso")
  572. end
  573. if arms ~= nil and torso ~= nil then
  574. sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
  575. if sh ~= nil then
  576. local yes = true
  577. if yes then
  578. yes = false
  579. if ison == 1 then
  580. sh[1].Part1 = nil
  581. sh[2].Part1 = nil
  582. local weld1 = Instance.new("Weld")
  583. weld1.Part0 = torso
  584. weld1.Parent = torso
  585. weld1.Part1 = arms[1]
  586. weld1.C1 = CFrame.new(-0.5, 0.75, 1)
  587. arms[1].Name = "LDave"
  588. arms[1].CanCollide = true
  589. welds[1] = weld1
  590. -------------------------------------------
  591. local weld2 = Instance.new("Weld")
  592. weld2.Part0 = torso
  593. weld2.Parent = torso
  594. weld2.Part1 = arms[2]
  595. weld2.C1 = CFrame.new(0.5,0.495,1.25) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
  596. arms[2].Name = "RDave"
  597. arms[2].CanCollide = true
  598. welds[2] = weld2
  599. ---------------------------------
  600. local force = Instance.new("BodyForce")
  601. force.Parent = torso
  602. f = force
  603. wait(0.01)
  604. elseif ison == 0 then
  605. if arms then
  606. sh[1].Part1 = arms[1]
  607. sh[2].Part1 = arms[2]
  608. f.Parent = nil
  609. arms[2].Name = "Right Leg"
  610. arms[1].Name = "Left Leg"
  611. welds[1].Parent = nil
  612. welds[2].Parent = nil
  613. end
  614. end
  615. --
  616. end
  617. else
  618. print("sh")
  619. end
  620. else
  621. print("arms")
  622. end
  623. end
  624. ----------------------------------------------------------------------------------------------------------------
  625. function GunUp()
  626. Holstered = false
  627. Tool.Enabled = true
  628. torso = Tool.Parent:FindFirstChild("Torso")
  629. if torso ~= nil then
  630. torso.weld1.C1 = CFrame.new(0.7, 0.9, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(28), math.rad(-1))
  631. torso.weld2.C1 = CFrame.new(-0.6, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-0.01), 0)
  632. end
  633. end
  634.  
  635. function GunDown()
  636. Holstered = true
  637. Tool.Enabled = false -- You don't want to be shooting if your not aiming
  638. torso = Tool.Parent:FindFirstChild("Torso")
  639. if torso ~= nil then
  640. torso.weld1.C1 = CFrame.new(0.5,0,.5) * CFrame.fromEulerAnglesXYZ(math.rad(315), 0, math.rad(-40))
  641. torso.weld2.C1 = CFrame.new(-.8, -0.6, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-40), math.rad(-60), 0)
  642. end
  643. end
  644. -----------------------------------------------------------------------------------------------------------------
  645. function onEquippedLocal(mouse)
  646. mouse.Icon = "" -- Chuck in a cool crosshair here..
  647. mouse.KeyDown:connect(onKeyDown)
  648. end
  649. -----------------------------------------------------------------------------------------------------------------
  650. function onKeyDown(key)
  651. if (key~=nil) then
  652. key = key:lower()
  653.  
  654. if (key=="c") then -- Toggle Crouch (For some reason it breaks if you patrol first, working on this...
  655. if on == 1 then
  656. on = 0
  657. elseif on == 0 then
  658. on = 1
  659. end
  660. Crouch(on)
  661.  
  662. elseif (key=="e") then -- Toggle Patrol
  663. if Holstered == true then
  664. script.Parent.Parent.Humanoid.WalkSpeed = 16
  665. GunUp()
  666. elseif Holstered == false then
  667. script.Parent.Parent.Humanoid.WalkSpeed = 20
  668. GunDown()
  669. end end end end
  670. Tool.Equipped:connect(onEquippedLocal)
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677. end))
  678. LocalScript24.Name = "GuiScript"
  679. LocalScript24.Parent = Tool0
  680. table.insert(cors,sandbox(LocalScript24,function()
  681. local Tool = script.Parent
  682.  
  683. local vPlayer
  684. local Gui
  685. local Alt
  686. local Coords
  687. local Ammo
  688. local ready = false
  689.  
  690.  
  691. function setUpGui()
  692. if vPlayer == nil or vPlayer:findFirstChild("PlayerGui") == nil then
  693. return
  694. end
  695.  
  696. Gui = script.ScreenGui:Clone()
  697. Gui.Name = "GunDisplay"
  698. Gui.Parent = vPlayer.PlayerGui
  699. end
  700.  
  701. function onEquippedLocal(mouse)
  702. vPlayer = game.Players.LocalPlayer
  703.  
  704. setUpGui()
  705. ready = false
  706. end
  707.  
  708. function onUnequippedLocal(mouse)
  709. if Gui then
  710. Gui:remove()
  711. end
  712.  
  713. Gui = nil
  714. Alt = nil
  715. Coords = nil
  716. Ammo = nil
  717. vPlayer = nil
  718. end
  719.  
  720. Tool.Equipped:connect(onEquippedLocal)
  721. Tool.Unequipped:connect(onUnequippedLocal)
  722.  
  723. while true do
  724. wait()
  725. if Gui then
  726. Gui.Stats.Mode.Text = "Mode: " ..script.Parent.ModeText.Value
  727. Gui.Stats.Ammo.Ammo.Text = ""..math.floor((((script.Parent.Ammo.Value / script.Parent.MaxAmmo.Value)) * 100)).."%"
  728. Gui.Stats.Reload.Text = script.Parent.StringValue.Value
  729. if script.Parent.VisibleB.Value then
  730. Gui.Stats.Reload.Visible = true
  731. else
  732. Gui.Stats.Reload.Visible = false
  733. end
  734. if (((script.Parent.Ammo.Value / script.Parent.MaxAmmo.Value)) * 100) > 66 then
  735. Gui.Stats.Ammo.Ammo.TextColor3 = Color3.new(-0,-128,-0)
  736. elseif (((script.Parent.Ammo.Value / script.Parent.MaxAmmo.Value)) * 100) > 33 then
  737. Gui.Stats.Ammo.Ammo.TextColor3 = Color3.new(-255,-255,-102)
  738. elseif (((script.Parent.Ammo.Value / script.Parent.MaxAmmo.Value)) * 100) > 0 then
  739. Gui.Stats.Ammo.Ammo.TextColor3 = Color3.new(-255,-51,-0)
  740. end
  741.  
  742. end
  743. end
  744.  
  745. end))
  746. ScreenGui25.Parent = LocalScript24
  747. Frame26.Name = "Stats"
  748. Frame26.Parent = ScreenGui25
  749. Frame26.Transparency = 1
  750. Frame26.Size = UDim2.new(0.200000003, 0, 0.100000001, 0)
  751. Frame26.Position = UDim2.new(0.100000001, 0, 0.649999976, 0)
  752. Frame26.BackgroundTransparency = 1
  753. TextButton27.Name = "Mode"
  754. TextButton27.Parent = Frame26
  755. TextButton27.Transparency = 1
  756. TextButton27.Size = UDim2.new(1, 0, 0.5, 0)
  757. TextButton27.Text = "Mode: Nil"
  758. TextButton27.BackgroundTransparency = 1
  759. TextButton27.Font = Enum.Font.ArialBold
  760. TextButton27.FontSize = Enum.FontSize.Size18
  761. TextButton27.TextColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  762. TextButton28.Name = "Ammo"
  763. TextButton28.Parent = Frame26
  764. TextButton28.Transparency = 1
  765. TextButton28.Size = UDim2.new(1, 0, 0.5, 0)
  766. TextButton28.Text = "Ammo: "
  767. TextButton28.Position = UDim2.new(-0.119999997, 0, 0.5, 0)
  768. TextButton28.BackgroundTransparency = 1
  769. TextButton28.Font = Enum.Font.ArialBold
  770. TextButton28.FontSize = Enum.FontSize.Size18
  771. TextButton28.TextColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  772. TextButton29.Name = "Ammo"
  773. TextButton29.Parent = TextButton28
  774. TextButton29.Transparency = 1
  775. TextButton29.Size = UDim2.new(1, 0, 1, 0)
  776. TextButton29.Text = "90%"
  777. TextButton29.Position = UDim2.new(0.699999988, 0, 0, 0)
  778. TextButton29.BackgroundTransparency = 1
  779. TextButton29.Font = Enum.Font.ArialBold
  780. TextButton29.FontSize = Enum.FontSize.Size18
  781. TextButton29.TextColor3 = Color3.new(1, 0.2, 0)
  782. TextButton29.TextXAlignment = Enum.TextXAlignment.Left
  783. TextButton30.Name = "Reload"
  784. TextButton30.Parent = Frame26
  785. TextButton30.Transparency = 1
  786. TextButton30.Size = UDim2.new(1, 0, 0.5, 0)
  787. TextButton30.Text = "Reloading"
  788. TextButton30.Position = UDim2.new(0, 0, 1, 0)
  789. TextButton30.Visible = false
  790. TextButton30.BackgroundTransparency = 1
  791. TextButton30.Font = Enum.Font.ArialBold
  792. TextButton30.FontSize = Enum.FontSize.Size18
  793. TextButton30.TextColor3 = Color3.new(1, 0.2, 0)
  794. TextButton30.TextTransparency = 1.8000003099442
  795. Script31.Name = "Flash"
  796. Script31.Parent = TextButton30
  797. table.insert(cors,sandbox(Script31,function()
  798. while true do wait()
  799. for i=1,5 do
  800. script.Parent.TextTransparency = script.Parent.TextTransparency + 0.1
  801. wait(0.05)
  802. end
  803. wait(0.1)
  804. for i=1,5 do
  805. script.Parent.TextTransparency = script.Parent.TextTransparency - 0.1
  806. wait(0.05)
  807. end
  808. end
  809.  
  810. end))
  811. LocalScript32.Name = "MainScript"
  812. LocalScript32.Parent = Tool0
  813. table.insert(cors,sandbox(LocalScript32,function()
  814. wait(1)
  815. local Tool = script.Parent;
  816. local pewsound
  817. local bangsound
  818. local cam
  819. local ggui
  820.  
  821. enabled = true
  822. automatichold = false
  823. dmged = false
  824. shotgun = false
  825. equipped = false
  826. overheated = false
  827. isZoom = false
  828.  
  829. -----------------------------------------ONLY EDIT THESE VALUES!!!!!-----------------------------------------
  830. -----!Instructions!-----
  831. --Make sure you have a part in the gun named Barrel, it is where the raycast will shoot from.--
  832. --Just place this script into any gun and edit the values below.--
  833. --Editting anything else will risk breaking it.--
  834. ------------------------
  835. Damage = 20
  836. SPS = 15 -- Shots Per Second, gives a limit of how fast the gun shoots.
  837. Recoil = 3 -- [1-10] [1 = Minigun, 10 = Sniper]
  838. WallShoot = false -- Shoots through walls.
  839. GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
  840. BulletColor = "Royal purple" -- Any Brickcolor will work.
  841. Flash = true
  842. --------------------------------------------------------------------------------------------------------
  843.  
  844. local zm = Instance.new("Part")
  845. zm.Name = "ZoomZM"
  846. zm.Anchored = true
  847. zm.Transparency = 1
  848. zm.Size = Vector3.new(1,1,1)
  849. zm.CanCollide = false
  850. GunType = 0
  851.  
  852. --[[local gui = Instance.new("ScreenGui")
  853. local bg = Instance.new("Frame",gui)
  854. local bar = Instance.new("Frame",bg)
  855. local bvl = Instance.new("ImageLabel", bg)
  856. bvl.Name = "Bevel"
  857. bvl.BackgroundTransparency = 1
  858. bvl.Image = "http://www.roblox.com/asset/?id=56852431"
  859. bvl.Size = UDim2.new(1,0,1,0)
  860. bg.Name = "Back"
  861. bar.Name = "Charge"
  862. bar.BackgroundColor3 = Color3.new(200/255,0/255,0/255)
  863. bg.BackgroundColor3 = Color3.new(200/255,200/255,200/255)
  864. bg.Size = UDim2.new(0,10,0,-100)
  865. bg.Position = UDim2.new(0,5,0,500)
  866. bar.Size = UDim2.new(0,4,-1,0)
  867. bar.Position = UDim2.new(0,3,1,0)
  868.  
  869. ggui = gui:Clone()
  870. ggui.Name = "GunGui"
  871. ggui.Back.Charge.Size = UDim2.new(0,4,-(script.Charge.Value/100),0)]]
  872.  
  873. GroupID = 9999
  874.  
  875. function AntiGH(char1,char2)
  876. if GH then
  877. local plyr1 = game.Players:findFirstChild(char1.Name)
  878. local plyr2 = game.Players:findFirstChild(char2.Name)
  879. if plyr1 and plyr2 then
  880. if plyr1:IsInGroup(GroupID) and plyr2:IsInGroup(GroupID) then
  881. return false
  882. end
  883. end
  884. return true
  885. elseif not GH then
  886. return true
  887. end
  888. end
  889.  
  890. MaxDist = 1000
  891.  
  892. function RayCast(Start,End,Ignore)
  893. if WallShoot then
  894. ray1 = Ray.new(Start, End.unit * 999.999)
  895. local Part1, TempPos = Workspace:FindPartOnRay(ray1,Ignore)
  896. ray2 = Ray.new(TempPos, End.unit * 999.999)
  897. local Part2, EndPos = Workspace:FindPartOnRay(ray2,Part1)
  898. return Part1, Part2, EndPos
  899. elseif not WallShoot then
  900. ray = Ray.new(Start, End.unit * 999.999)
  901. return Workspace:FindPartOnRay(ray,Ignore)
  902. end
  903. end
  904.  
  905. function DmgPlr(Part)
  906. if Part ~= nil then
  907. local c = Instance.new("ObjectValue")
  908. c.Name = "creator"
  909. c.Value = game.Players:findFirstChild(script.Parent.Parent.Name)
  910. local hum = Part.Parent:findFirstChild("Humanoid")
  911. local hathum = Part.Parent.Parent:findFirstChild("Humanoid")
  912. local hat = Part.Parent
  913. if hathum ~= nil and hat:IsA("Hat") and AntiGH(hathum.Parent, script.Parent.Parent) then
  914. hathum:TakeDamage(Damage/1)
  915. Part.Parent = game.Workspace
  916. Part.CFrame = CFrame.new(Part.Position + Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  917. hat:Remove()
  918. c.Parent = hathum
  919. game.Debris:AddItem(c,1.5)
  920. elseif hum ~= nil and AntiGH(hum.Parent, script.Parent.Parent) then
  921. if Part.Name == "Head" then
  922. hum:TakeDamage(Damage*27.3)
  923. end
  924. hum:TakeDamage(Damage)
  925. c.Parent = hum
  926. game.Debris:AddItem(c,1.5)
  927. end
  928. end
  929. end
  930.  
  931. function onButton1Down(mouse)
  932. if script.Parent.Ammo.Value == 0 then
  933. else
  934. if GunType == 0 then
  935. if (not enabled) then return end
  936. enabled = false
  937. LaserShoot(mouse)
  938. if Flash then
  939. script.Parent.Barrel.Light.Light.Visible = true
  940. end
  941. script.Parent.Ammo.Value = script.Parent.Ammo.Value - 1
  942. wait(0.01)
  943. if Flash then
  944. script.Parent.Barrel.Light.Light.Visible = false
  945. end
  946. wait(1/SPS)
  947. enabled = true
  948. elseif GunType == 1 then
  949. automatichold = true
  950. while automatichold == true and script.Parent.Ammo.Value ~= 0 do wait()
  951. if (not enabled) then return end
  952. if script.Parent.Parent:findFirstChild("Humanoid").Health == 0 then script.Parent:Remove() end
  953. enabled = false
  954. LaserShoot(mouse)
  955. if Flash then
  956. script.Parent.Barrel.Light.Light.Visible = true
  957. end
  958. script.Parent.Ammo.Value = script.Parent.Ammo.Value - 1
  959. wait(0.01)
  960. if Flash then
  961. script.Parent.Barrel.Light.Light.Visible = false
  962. end
  963. wait(1/SPS)
  964. enabled = true
  965. end
  966. end
  967. end
  968. end
  969.  
  970. function LaserShoot(mouse)
  971. hit = mouse.Hit.p
  972. local StartPos = script.Parent.Barrel.CFrame.p
  973. local rv = (StartPos-hit).magnitude/(Recoil * 20)
  974. local rcl = Vector3.new(math.random(-rv,rv),math.random(-rv,rv),math.random(-rv,rv))
  975. aim = hit + rcl
  976. local P = Instance.new("Part")
  977. P.Name = "Bullet"
  978. P.formFactor = 3
  979. P.BrickColor = BrickColor.new(BulletColor)
  980. P.Size = Vector3.new(4,1,4)
  981. P.Anchored = true
  982. P.CanCollide = false
  983. P.Transparency = 0.5
  984. P.Parent = script.Parent.Parent
  985. local m = Instance.new("CylinderMesh")
  986. m.Name = "Mesh"
  987. m.Parent = P
  988. local c = Instance.new("ObjectValue")
  989. c.Name = "creator"
  990. c.Value = game.Players:findFirstChild(script.Parent.Parent.Name)
  991. pewsound = script:FindFirstChild("Fire")
  992. if pewsound then
  993. pewsound:Play()
  994. end --Brick created. Moving on to next part
  995. local SPos = script.Parent.Barrel.CFrame.p
  996. if WallShoot then
  997. local Part1, Part2, EndPos = RayCast(SPos, (aim-SPos).unit * 999, script.Parent.Parent)
  998. DmgPlr(Part1)
  999. DmgPlr(Part2)
  1000. if Part1 and Part2 then
  1001. local enddist = (EndPos-SPos).magnitude
  1002. P.CFrame = CFrame.new(EndPos, SPos) * CFrame.new(0,0,-enddist/2) * CFrame.Angles(math.rad(90),0,0)
  1003. m.Scale = Vector3.new(.04,enddist,.04)
  1004. else
  1005. P.CFrame = CFrame.new(EndPos, SPos) * CFrame.new(0,0,-MaxDist/2) * CFrame.Angles(math.rad(90),0,0)
  1006. m.Scale = Vector3.new(.04,MaxDist,.04)
  1007. end
  1008. elseif not WallShoot then
  1009. local Part, Pos = RayCast(SPos, (aim-SPos).unit * 999, script.Parent.Parent)
  1010. DmgPlr(Part)
  1011. if Part then
  1012. local dist = (Pos-SPos).magnitude
  1013. P.CFrame = CFrame.new(Pos, SPos) * CFrame.new(0,0,-dist/2) * CFrame.Angles(math.rad(90),0,0)
  1014. m.Scale = Vector3.new(.1,dist,.1)
  1015. else
  1016. P.CFrame = CFrame.new(Pos, SPos) * CFrame.new(0,0,-MaxDist/2) * CFrame.Angles(math.rad(90),0,0)
  1017. m.Scale = Vector3.new(.1,MaxDist,.1)
  1018. end
  1019. end
  1020. game.Debris:AddItem(P,.1)
  1021. end
  1022.  
  1023. function onButton1Up(mouse)
  1024. automatichold = false
  1025. end
  1026.  
  1027. function onKeyDown(key, mouse)
  1028.  
  1029.  
  1030.  
  1031. if key:lower() == "r" then
  1032. if script.Parent.Ammo.Value ~= script.Parent.MaxAmmo.Value then
  1033. reloadsound = script:FindFirstChild("Reload")
  1034. if reloadsound then
  1035. reloadsound:Play()
  1036. end
  1037. enabled = false
  1038. script.Parent.VisibleB.Value = true
  1039. script.Parent.StringValue.Value = "Reloading"
  1040. repeat script.Parent.StringValue.Value = "Reloading" wait(0.3) script.Parent.Ammo.Value = script.Parent.Ammo.Value + 3 script.Parent.StringValue.Value = "Reloading" until script.Parent.Ammo.Value >= script.Parent.MaxAmmo.Value
  1041. script.Parent.Ammo.Value = script.Parent.MaxAmmo.Value
  1042. wait(0.2)
  1043. script.Parent.VisibleB.Value = false
  1044. enabled = true
  1045. end
  1046. end
  1047.  
  1048. if key:lower() == "m" then
  1049. if GunType == 0 then
  1050. GunType = 0
  1051. Recoil = 3
  1052. else
  1053. GunType = 1
  1054. Recoil = 3
  1055. end
  1056. end
  1057.  
  1058. end
  1059.  
  1060. function onEquipped(mouse)
  1061. equipped = true
  1062.  
  1063. if mouse == nil then
  1064. print("Mouse not found")
  1065. return
  1066. end
  1067. mouse.Icon = "http://www.roblox.com/asset/?id=52812029"
  1068. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  1069. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  1070. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  1071.  
  1072. end
  1073.  
  1074. function onUnequipped(mouse)
  1075. equipped = false
  1076. automatichold = false
  1077.  
  1078.  
  1079. end
  1080.  
  1081. script.Parent.Equipped:connect(onEquipped)
  1082. script.Parent.Unequipped:connect(onUnequipped)
  1083. while true do wait()
  1084. if script.Parent.Ammo.Value == 0 then
  1085. script.Parent.VisibleB.Value = true
  1086. script.Parent.StringValue.Value = "Reload"
  1087. end
  1088. if GunType == 1 then
  1089. script.Parent.ModeText.Value = "Auto"
  1090. else
  1091. script.Parent.ModeText.Value = "Semi"
  1092. end
  1093. end
  1094.  
  1095.  
  1096. end))
  1097. Sound33.Name = "Fire"
  1098. Sound33.Parent = LocalScript32
  1099. Sound33.SoundId = "http://roblox.com/asset/?id=138083993"
  1100. Sound33.Volume = 2
  1101. Sound34.Name = "Reload"
  1102. Sound34.Parent = LocalScript32
  1103. Sound34.SoundId = "http://www.roblox.com/asset/?id=519174837"
  1104. Sound34.Volume = 1
  1105. Sound34.PlayOnRemove = true
  1106. StringValue35.Name = "ModeText"
  1107. StringValue35.Parent = Tool0
  1108. StringValue35.Value = "Nil"
  1109. for i,v in pairs(mas:GetChildren()) do
  1110. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  1111. pcall(function() v:MakeJoints() end)
  1112. end
  1113. mas:Destroy()
  1114. for i,v in pairs(cors) do
  1115. spawn(function()
  1116. pcall(v)
  1117. end)
  1118. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement