Advertisement
Vzurxy

Untitled

Sep 25th, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.93 KB | None | 0 0
  1. -- Instances:
  2. local GunModz = Instance.new("ScreenGui")
  3. local mainDrag = Instance.new("Frame")
  4. local main = Instance.new("Frame")
  5. local m9 = Instance.new("TextButton")
  6. local rem = Instance.new("TextButton")
  7. local m4 = Instance.new("TextButton")
  8. local ta = Instance.new("TextButton")
  9. local ak = Instance.new("TextButton")
  10. local TopBar = Instance.new("TextLabel")
  11. --Properties:
  12. GunModz.Name = "GunModz"
  13. GunModz.Parent = game.CoreGui
  14.  
  15. mainDrag.Name = "mainDrag"
  16. mainDrag.Parent = GunModz
  17. mainDrag.Active = true
  18. mainDrag.BackgroundColor3 = Color3.new(1, 1, 1)
  19. mainDrag.BackgroundTransparency = 1
  20. mainDrag.Position = UDim2.new(0.477227718, 0, 0.550653577, 0)
  21. mainDrag.Size = UDim2.new(0, 486, 0, 252)
  22.  
  23. main.Name = "main"
  24. main.Parent = mainDrag
  25. main.BackgroundColor3 = Color3.new(1, 1, 1)
  26. main.BackgroundTransparency = 0.5
  27. main.BorderSizePixel = 0
  28. main.Position = UDim2.new(0, 0, -0.00398406386, 0)
  29. main.Size = UDim2.new(0, 486, 0, 252)
  30.  
  31. m9.Name = "m9"
  32. m9.Parent = main
  33. m9.BackgroundColor3 = Color3.new(1, 1, 1)
  34. m9.BackgroundTransparency = 0.5
  35. m9.BorderSizePixel = 0
  36. m9.Position = UDim2.new(0.028806584, 0, 0.158730164, 0)
  37. m9.Size = UDim2.new(0, 63, 0, 50)
  38. m9.Font = Enum.Font.SourceSans
  39. m9.Text = "M9"
  40. m9.TextColor3 = Color3.new(0, 0, 0)
  41. m9.TextScaled = true
  42. m9.TextSize = 14
  43. m9.TextWrapped = true
  44.  
  45. rem.Name = "rem"
  46. rem.Parent = main
  47. rem.BackgroundColor3 = Color3.new(1, 1, 1)
  48. rem.BackgroundTransparency = 0.5
  49. rem.BorderSizePixel = 0
  50. rem.Position = UDim2.new(0.197530866, 0, 0.158730164, 0)
  51. rem.Size = UDim2.new(0, 63, 0, 50)
  52. rem.Font = Enum.Font.SourceSans
  53. rem.Text = "Remmington"
  54. rem.TextColor3 = Color3.new(0, 0, 0)
  55. rem.TextScaled = true
  56. rem.TextSize = 14
  57. rem.TextWrapped = true
  58.  
  59. m4.Name = "m4"
  60. m4.Parent = main
  61. m4.BackgroundColor3 = Color3.new(1, 1, 1)
  62. m4.BackgroundTransparency = 0.5
  63. m4.BorderSizePixel = 0
  64. m4.Position = UDim2.new(0.374485612, 0, 0.158730164, 0)
  65. m4.Size = UDim2.new(0, 63, 0, 50)
  66. m4.Font = Enum.Font.SourceSans
  67. m4.Text = "M4A1"
  68. m4.TextColor3 = Color3.new(0, 0, 0)
  69. m4.TextScaled = true
  70. m4.TextSize = 14
  71. m4.TextWrapped = true
  72.  
  73. ta.Name = "ta"
  74. ta.Parent = main
  75. ta.BackgroundColor3 = Color3.new(1, 1, 1)
  76. ta.BackgroundTransparency = 0.5
  77. ta.BorderSizePixel = 0
  78. ta.Position = UDim2.new(0.54320991, 0, 0.158730164, 0)
  79. ta.Size = UDim2.new(0, 63, 0, 50)
  80. ta.Font = Enum.Font.SourceSans
  81. ta.Text = "Taser"
  82. ta.TextColor3 = Color3.new(0, 0, 0)
  83. ta.TextScaled = true
  84. ta.TextSize = 14
  85. ta.TextWrapped = true
  86.  
  87. ak.Name = "ak"
  88. ak.Parent = main
  89. ak.BackgroundColor3 = Color3.new(1, 1, 1)
  90. ak.BackgroundTransparency = 0.5
  91. ak.BorderSizePixel = 0
  92. ak.Position = UDim2.new(0.703703761, 0, 0.158730164, 0)
  93. ak.Size = UDim2.new(0, 63, 0, 50)
  94. ak.Font = Enum.Font.SourceSans
  95. ak.Text = "AK-47"
  96. ak.TextColor3 = Color3.new(0, 0, 0)
  97. ak.TextScaled = true
  98. ak.TextSize = 14
  99. ak.TextWrapped = true
  100.  
  101. TopBar.Name = "TopBar"
  102. TopBar.Parent = mainDrag
  103. TopBar.BackgroundColor3 = Color3.new(1, 1, 1)
  104. TopBar.BackgroundTransparency = 0.5
  105. TopBar.BorderSizePixel = 0
  106. TopBar.Size = UDim2.new(0, 486, 0, 28)
  107. TopBar.Font = Enum.Font.SourceSans
  108. TopBar.Text = "GunModz | By drums#0995"
  109. TopBar.TextColor3 = Color3.new(0, 0, 0)
  110. TopBar.TextScaled = true
  111. TopBar.TextSize = 14
  112. TopBar.TextWrapped = true
  113. TopBar.TextXAlignment = Enum.TextXAlignment.Left
  114. -- Scripts:
  115.  
  116. mainDrag.Draggable = true
  117.  
  118. m9.MouseButton1Down:connect(function()
  119. local Player = game.Players.LocalPlayer.Name
  120. local Gun = "M9" -- < -- Gun Name
  121. local Run = game:GetService("RunService")
  122.  
  123. Gun = game.Players[Player].Character[Gun]
  124. local Mouse = game.Players.LocalPlayer:GetMouse()
  125. local Down = false
  126. local Sound = Gun.Handle.FireSound
  127.  
  128. function CreateRay(Point_A, Point_B)
  129. local Ray = Ray.new(Point_A, (Point_B - Point_A).Unit * (2 ^ 31 - 1))
  130. local Part, Pos = workspace:FindPartOnRay(Ray, game.Players.LocalPlayer.Character)
  131. local Dist = (Point_A - Pos).Magnitude
  132. local CFrame = CFrame.new(Point_A, Pos) * CFrame.new(0, 0, -Dist / 2)
  133.  
  134. return CFrame, Dist, Ray
  135. end
  136.  
  137. function FireLaser(target)
  138. coroutine.resume(coroutine.create(function()
  139. local C, D, R = CreateRay(Gun.Muzzle.CFrame.p, target.CFrame.p)
  140. local Bullet = Instance.new("Part", Gun)
  141. Bullet.BrickColor = BrickColor.Yellow()
  142. Bullet.Material = "Neon"
  143. Bullet.Anchored = true
  144. Bullet.CanCollide = false
  145. Bullet.Size = Vector3.new(0.2, 0.2, D)
  146. Bullet.CFrame = C
  147.  
  148. local bulletTable = {}
  149. table.insert(bulletTable, {
  150. Hit = target,
  151. Distance = D,
  152. Cframe = C,
  153. RayObject = R
  154. })
  155.  
  156. game.ReplicatedStorage.ShootEvent:FireServer(bulletTable, Gun)
  157. local C = Sound:Clone()
  158. C.Parent = Gun
  159. C:Play()
  160. wait(0.05)
  161. Bullet:Remove()
  162. end))
  163. end
  164.  
  165. Mouse.Button1Down:Connect(function()
  166. Down = true
  167. end)
  168.  
  169.  
  170. Mouse.Button1Up:Connect(function()
  171. Down = false
  172. end)
  173.  
  174. while Run.Stepped:wait() do
  175. if Down == true then
  176. game.ReplicatedStorage.SoundEvent:FireServer(Sound, Gun)
  177. FireLaser(Mouse.Target)
  178. end
  179. end
  180. end)
  181.  
  182. rem.MouseButton1Down:connect(function()
  183. local Player = game.Players.LocalPlayer.Name
  184. local Gun = "Remington 870" -- < -- Gun Name
  185. local Run = game:GetService("RunService")
  186.  
  187. Gun = game.Players[Player].Character[Gun]
  188. local Mouse = game.Players.LocalPlayer:GetMouse()
  189. local Down = false
  190. local Sound = Gun.Handle.FireSound
  191.  
  192. function CreateRay(Point_A, Point_B)
  193. local Ray = Ray.new(Point_A, (Point_B - Point_A).Unit * (2 ^ 31 - 1))
  194. local Part, Pos = workspace:FindPartOnRay(Ray, game.Players.LocalPlayer.Character)
  195. local Dist = (Point_A - Pos).Magnitude
  196. local CFrame = CFrame.new(Point_A, Pos) * CFrame.new(0, 0, -Dist / 2)
  197.  
  198. return CFrame, Dist, Ray
  199. end
  200.  
  201. function FireLaser(target)
  202. coroutine.resume(coroutine.create(function()
  203. local C, D, R = CreateRay(Gun.Muzzle.CFrame.p, target.CFrame.p)
  204. local Bullet = Instance.new("Part", Gun)
  205. Bullet.BrickColor = BrickColor.Yellow()
  206. Bullet.Material = "Neon"
  207. Bullet.Anchored = true
  208. Bullet.CanCollide = false
  209. Bullet.Size = Vector3.new(0.2, 0.2, D)
  210. Bullet.CFrame = C
  211.  
  212. local bulletTable = {}
  213. table.insert(bulletTable, {
  214. Hit = target,
  215. Distance = D,
  216. Cframe = C,
  217. RayObject = R
  218. })
  219.  
  220. game.ReplicatedStorage.ShootEvent:FireServer(bulletTable, Gun)
  221. local C = Sound:Clone()
  222. C.Parent = Gun
  223. C:Play()
  224. wait(0.05)
  225. Bullet:Remove()
  226. end))
  227. end
  228.  
  229. Mouse.Button1Down:Connect(function()
  230. Down = true
  231. end)
  232.  
  233.  
  234. Mouse.Button1Up:Connect(function()
  235. Down = false
  236. end)
  237.  
  238. while Run.Stepped:wait() do
  239. if Down == true then
  240. game.ReplicatedStorage.SoundEvent:FireServer(Sound, Gun)
  241. FireLaser(Mouse.Target)
  242. end
  243. end
  244. end)
  245.  
  246. m4.MouseButton1Down:connect(function()
  247. local Player = game.Players.LocalPlayer.Name
  248. local Gun = "M4A1" -- < -- Gun Name
  249. local Run = game:GetService("RunService")
  250.  
  251. Gun = game.Players[Player].Character[Gun]
  252. local Mouse = game.Players.LocalPlayer:GetMouse()
  253. local Down = false
  254. local Sound = Gun.Handle.FireSound
  255.  
  256. function CreateRay(Point_A, Point_B)
  257. local Ray = Ray.new(Point_A, (Point_B - Point_A).Unit * (2 ^ 31 - 1))
  258. local Part, Pos = workspace:FindPartOnRay(Ray, game.Players.LocalPlayer.Character)
  259. local Dist = (Point_A - Pos).Magnitude
  260. local CFrame = CFrame.new(Point_A, Pos) * CFrame.new(0, 0, -Dist / 2)
  261.  
  262. return CFrame, Dist, Ray
  263. end
  264.  
  265. function FireLaser(target)
  266. coroutine.resume(coroutine.create(function()
  267. local C, D, R = CreateRay(Gun.Muzzle.CFrame.p, target.CFrame.p)
  268. local Bullet = Instance.new("Part", Gun)
  269. Bullet.BrickColor = BrickColor.Yellow()
  270. Bullet.Material = "Neon"
  271. Bullet.Anchored = true
  272. Bullet.CanCollide = false
  273. Bullet.Size = Vector3.new(0.2, 0.2, D)
  274. Bullet.CFrame = C
  275.  
  276. local bulletTable = {}
  277. table.insert(bulletTable, {
  278. Hit = target,
  279. Distance = D,
  280. Cframe = C,
  281. RayObject = R
  282. })
  283.  
  284. game.ReplicatedStorage.ShootEvent:FireServer(bulletTable, Gun)
  285. local C = Sound:Clone()
  286. C.Parent = Gun
  287. C:Play()
  288. wait(0.05)
  289. Bullet:Remove()
  290. end))
  291. end
  292.  
  293. Mouse.Button1Down:Connect(function()
  294. Down = true
  295. end)
  296.  
  297.  
  298. Mouse.Button1Up:Connect(function()
  299. Down = false
  300. end)
  301.  
  302. while Run.Stepped:wait() do
  303. if Down == true then
  304. game.ReplicatedStorage.SoundEvent:FireServer(Sound, Gun)
  305. FireLaser(Mouse.Target)
  306. end
  307. end
  308. end)
  309.  
  310. ta.MouseButton1Down:connect(function()
  311. local Player = game.Players.LocalPlayer.Name
  312. local Gun = "Taser" -- < -- Gun Name
  313. local Run = game:GetService("RunService")
  314.  
  315. Gun = game.Players[Player].Character[Gun]
  316. local Mouse = game.Players.LocalPlayer:GetMouse()
  317. local Down = false
  318. local Sound = Gun.Handle.FireSound
  319.  
  320. function CreateRay(Point_A, Point_B)
  321. local Ray = Ray.new(Point_A, (Point_B - Point_A).Unit * (2 ^ 31 - 1))
  322. local Part, Pos = workspace:FindPartOnRay(Ray, game.Players.LocalPlayer.Character)
  323. local Dist = (Point_A - Pos).Magnitude
  324. local CFrame = CFrame.new(Point_A, Pos) * CFrame.new(0, 0, -Dist / 2)
  325.  
  326. return CFrame, Dist, Ray
  327. end
  328.  
  329. function FireLaser(target)
  330. coroutine.resume(coroutine.create(function()
  331. local C, D, R = CreateRay(Gun.Muzzle.CFrame.p, target.CFrame.p)
  332. local Bullet = Instance.new("Part", Gun)
  333. Bullet.BrickColor = BrickColor.Yellow()
  334. Bullet.Material = "Neon"
  335. Bullet.Anchored = true
  336. Bullet.CanCollide = false
  337. Bullet.Size = Vector3.new(0.2, 0.2, D)
  338. Bullet.CFrame = C
  339.  
  340. local bulletTable = {}
  341. table.insert(bulletTable, {
  342. Hit = target,
  343. Distance = D,
  344. Cframe = C,
  345. RayObject = R
  346. })
  347.  
  348. game.ReplicatedStorage.ShootEvent:FireServer(bulletTable, Gun)
  349. local C = Sound:Clone()
  350. C.Parent = Gun
  351. C:Play()
  352. wait(0.05)
  353. Bullet:Remove()
  354. end))
  355. end
  356.  
  357. Mouse.Button1Down:Connect(function()
  358. Down = true
  359. end)
  360.  
  361.  
  362. Mouse.Button1Up:Connect(function()
  363. Down = false
  364. end)
  365.  
  366. while Run.Stepped:wait() do
  367. if Down == true then
  368. game.ReplicatedStorage.SoundEvent:FireServer(Sound, Gun)
  369. FireLaser(Mouse.Target)
  370. end
  371. end
  372. end)
  373.  
  374. ak.MouseButton1Down:connect(function()
  375. local Player = game.Players.LocalPlayer.Name
  376. local Gun = "AK-47" -- < -- Gun Name
  377. local Run = game:GetService("RunService")
  378.  
  379. Gun = game.Players[Player].Character[Gun]
  380. local Mouse = game.Players.LocalPlayer:GetMouse()
  381. local Down = false
  382. local Sound = Gun.Handle.FireSound
  383.  
  384. function CreateRay(Point_A, Point_B)
  385. local Ray = Ray.new(Point_A, (Point_B - Point_A).Unit * (2 ^ 31 - 1))
  386. local Part, Pos = workspace:FindPartOnRay(Ray, game.Players.LocalPlayer.Character)
  387. local Dist = (Point_A - Pos).Magnitude
  388. local CFrame = CFrame.new(Point_A, Pos) * CFrame.new(0, 0, -Dist / 2)
  389.  
  390. return CFrame, Dist, Ray
  391. end
  392.  
  393. function FireLaser(target)
  394. coroutine.resume(coroutine.create(function()
  395. local C, D, R = CreateRay(Gun.Muzzle.CFrame.p, target.CFrame.p)
  396. local Bullet = Instance.new("Part", Gun)
  397. Bullet.BrickColor = BrickColor.Yellow()
  398. Bullet.Material = "Neon"
  399. Bullet.Anchored = true
  400. Bullet.CanCollide = false
  401. Bullet.Size = Vector3.new(0.2, 0.2, D)
  402. Bullet.CFrame = C
  403.  
  404. local bulletTable = {}
  405. table.insert(bulletTable, {
  406. Hit = target,
  407. Distance = D,
  408. Cframe = C,
  409. RayObject = R
  410. })
  411.  
  412. game.ReplicatedStorage.ShootEvent:FireServer(bulletTable, Gun)
  413. local C = Sound:Clone()
  414. C.Parent = Gun
  415. C:Play()
  416. wait(0.05)
  417. Bullet:Remove()
  418. end))
  419. end
  420.  
  421. Mouse.Button1Down:Connect(function()
  422. Down = true
  423. end)
  424.  
  425.  
  426. Mouse.Button1Up:Connect(function()
  427. Down = false
  428. end)
  429.  
  430. while Run.Stepped:wait() do
  431. if Down == true then
  432. game.ReplicatedStorage.SoundEvent:FireServer(Sound, Gun)
  433. FireLaser(Mouse.Target)
  434. end
  435. end
  436. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement