zachhy

spamgun

Jul 23rd, 2020
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.79 KB | None | 0 0
  1.  
  2. local PERKY = "Quick Hands"
  3. local ABIL = "Quickscoper"
  4.  
  5. local Player = game.Players.LocalPlayer
  6. Player.Backpack:FindFirstChild("Client").Disabled = true
  7. local IS = game:GetService("UserInputService")
  8. local Camera = workspace.CurrentCamera
  9. local GT = Instance.new("Tool", Player.Backpack)
  10. GT.Name = "Gun"
  11. GT.RequiresHandle = false
  12. GT.CanBeDropped = false
  13. local Spec = 0
  14. local WeaponType
  15. local Spectatable = {}
  16. local SpectatingPlayer
  17. local FPS = false
  18. local PlayerIgnore = workspace:WaitForChild("Ignore"):WaitForChild("Players")
  19. local runService = game:GetService("RunService")
  20. local RS = game:GetService("RunService").RenderStepped
  21. local Char = Player.Character
  22. local Rig = Instance.new("Model", Char)
  23. local Humanoid = Char:WaitForChild("Humanoid")
  24. local Primed = false
  25. if 0 >= Humanoid.Health then
  26. return
  27. end
  28. local Mouse = Player:GetMouse()
  29. Mouse.TargetFilter = workspace.CurrentCamera
  30. local Disabled = false
  31. if Camera:findFirstChild("FpsModel") then
  32. Camera:findFirstChild("FpsModel"):Destroy()
  33. end
  34. local LA, RA, Head, T = Char:WaitForChild("Left Arm"), Char:WaitForChild("Right Arm"), Char:WaitForChild("Head"), Char:WaitForChild("Torso")
  35. local FpsModel = Instance.new("Model", Camera)
  36. FpsModel.Name = "FpsModel"
  37. local FpsWeapon = Instance.new("Part")
  38. FpsWeapon.Parent = FpsModel
  39. FpsWeapon.CanCollide = false
  40. FpsWeapon.Transparency = 1
  41. FpsWeapon.Size = Vector3.new(1, 1, 1)
  42. FpsWeapon.Name = "WeaponFPS"
  43. local FpsLArm = Char:WaitForChild("Left Arm"):clone()
  44. FpsLArm.Parent = FpsModel
  45. FpsLArm.CanCollide = false
  46. FpsLArm.Transparency = 1
  47. local m = Instance.new("BlockMesh", FpsLArm)
  48. m.Scale = Vector3.new(1, 1, 1)
  49. local FpsRArm = Char:WaitForChild("Right Arm"):clone()
  50. FpsRArm.Parent = FpsModel
  51. FpsRArm.CanCollide = false
  52. FpsRArm.Transparency = 1
  53. local m = Instance.new("BlockMesh", FpsRArm)
  54. m.Scale = Vector3.new(1, 1.1, 1)
  55. spawn(function()
  56. wait(0.5)
  57. if Char:FindFirstChild("Body Colors") then
  58. FpsLArm.BrickColor = Char:FindFirstChild("Body Colors").LeftArmColor
  59. FpsRArm.BrickColor = Char:FindFirstChild("Body Colors").RightArmColor
  60. end
  61. end)
  62. local Modules = game.ReplicatedStorage:WaitForChild("Modules")
  63. local M = require(Modules:WaitForChild("AnimationCore"))
  64. local WC = require(Modules:WaitForChild("WeaponCore"))
  65. local AniDB = false
  66. local Selected = false
  67. function AniEquipKnife()
  68. if WeaponType == "Gun" or not Selected then
  69. return
  70. end
  71. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.45, 0.5, -0.25) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(25)), 0.1, true)
  72. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(-180), math.rad(0), math.rad(0)), 0.25, true)
  73. wait(0.1)
  74. if WeaponType == "Gun" or not Selected then
  75. return
  76. end
  77. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-75), math.rad(-25), math.rad(0)), 0.25, true)
  78. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-55), math.rad(25), math.rad(0)), 0.25, true)
  79. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.25, true)
  80. end
  81. function AniChargeKnife()
  82. if WeaponType == "Gun" or not Selected then
  83. return
  84. end
  85. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-180), math.rad(0), math.rad(0)), .1, true)
  86. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-90), math.rad(25), math.rad(0)), .1, true)
  87. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), .1, true)
  88. end
  89. function AniChargeKnife2()
  90. if WeaponType == "Gun" or not Selected then
  91. return
  92. end
  93. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-180), math.rad(0), math.rad(0)), .1, true)
  94. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-90), math.rad(25), math.rad(0)), .1, true)
  95. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), .1, true)
  96. end
  97. function AniThrowKnife()
  98. if WeaponType == "Gun" or not Selected then
  99. return
  100. end
  101. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-10), math.rad(-25), math.rad(0)), 0.1, true)
  102. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-35), math.rad(25), math.rad(0)), 0.1, true)
  103. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.1, true)
  104. wait(0.1)
  105. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(25), math.rad(-25), math.rad(0)), 0.2, true)
  106. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-35), math.rad(25), math.rad(0)), 0.2, true)
  107. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.2, true)
  108. end
  109. function AniSlashKnife1()
  110. if WeaponType == "Gun" or not Selected then
  111. return
  112. end
  113. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-125), math.rad(-30), math.rad(0)), 0.15, true)
  114. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-65), math.rad(30), math.rad(0)), 0.15, true)
  115. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.15, true)
  116. wait(0.15)
  117. if WeaponType == "Gun" or not Selected then
  118. return
  119. end
  120. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 1, -0.25) * CFrame.Angles(math.rad(-15), math.rad(-35), math.rad(0)), 0.05, true)
  121. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-35), math.rad(35), math.rad(0)), 0.05, true)
  122. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.05, true)
  123. wait(0.05)
  124. if WeaponType == "Gun" or not Selected then
  125. return
  126. end
  127. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-75), math.rad(-25), math.rad(0)), 0.25, true)
  128. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-55), math.rad(25), math.rad(0)), 0.25, true)
  129. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.25, true)
  130. end
  131. function AniSlashKnife2()
  132. if WeaponType == "Gun" or not Selected then
  133. return
  134. end
  135. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-175), math.rad(-10), math.rad(0)), 0.25, true)
  136. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-65), math.rad(10), math.rad(0)), 0.25, true)
  137. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(110), math.rad(180), math.rad(0)), 0.25, true)
  138. wait(0.25)
  139. if WeaponType == "Gun" or not Selected then
  140. return
  141. end
  142. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 1, -0.25) * CFrame.Angles(math.rad(-35), math.rad(-35), math.rad(0)), 0.05, true)
  143. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 1, -0.25) * CFrame.Angles(math.rad(-35), math.rad(15), math.rad(0)), 0.05, true)
  144. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(110), math.rad(180), math.rad(0)), 0.05, true)
  145. wait(0.05)
  146. if WeaponType == "Gun" or not Selected then
  147. return
  148. end
  149. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 1, -0.25) * CFrame.Angles(math.rad(-55), math.rad(-35), math.rad(0)), 0.25, true)
  150. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-55), math.rad(25), math.rad(0)), 0.25, true)
  151. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(110), math.rad(180), math.rad(0)), 0.25, true)
  152. wait(0.25)
  153. if WeaponType == "Gun" or not Selected then
  154. return
  155. end
  156. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-75), math.rad(-25), math.rad(0)), 0.25, true)
  157. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.25, true)
  158. end
  159. function AniSlashKnife3()
  160. if WeaponType == "Gun" or not Selected then
  161. return
  162. end
  163. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.7) * CFrame.Angles(math.rad(45), math.rad(-30), math.rad(0)), 0.2, true)
  164. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-35), math.rad(10), math.rad(0)), 0.2, true)
  165. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.2, true)
  166. wait(0.2)
  167. if WeaponType == "Gun" or not Selected then
  168. return
  169. end
  170. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 1, -0.25) * CFrame.Angles(math.rad(-60), math.rad(-35), math.rad(0)), 0.05, true)
  171. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-45), math.rad(35), math.rad(0)), 0.05, true)
  172. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1.5, 1) * CFrame.Angles(math.rad(130), math.rad(0), math.rad(0)), 0.05, true)
  173. wait(0.05)
  174. if WeaponType == "Gun" or not Selected then
  175. return
  176. end
  177. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 1, -0.25) * CFrame.Angles(math.rad(-65), math.rad(-35), math.rad(0)), 0.25, true)
  178. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-55), math.rad(25), math.rad(0)), 0.25, true)
  179. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1.5, 1) * CFrame.Angles(math.rad(130), math.rad(0), math.rad(0)), 0.25, true)
  180. wait(0.25)
  181. if WeaponType == "Gun" or not Selected then
  182. return
  183. end
  184. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-75), math.rad(-25), math.rad(0)), 0.25, true)
  185. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.25, true)
  186. end
  187. function AniSlashKnife4()
  188. if WeaponType == "Gun" or not Selected then
  189. return
  190. end
  191. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-125), math.rad(0), math.rad(0)), 0.15, true)
  192. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-65), math.rad(0), math.rad(0)), 0.15, true)
  193. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.15, true)
  194. wait(0.15)
  195. if WeaponType == "Gun" or not Selected then
  196. return
  197. end
  198. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 1, -0.25) * CFrame.Angles(math.rad(-15), math.rad(-45), math.rad(0)), 0.05, true)
  199. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-35), math.rad(45), math.rad(0)), 0.05, true)
  200. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.05, true)
  201. wait(0.05)
  202. if WeaponType == "Gun" or not Selected then
  203. return
  204. end
  205. M.Animate(Char:findFirstChild("MotorRight Arm", true), CFrame.new(-0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-75), math.rad(-25), math.rad(0)), 0.25, true)
  206. M.Animate(Char:findFirstChild("MotorLeft Arm", true), CFrame.new(0.5, 0.5, -0.25) * CFrame.Angles(math.rad(-55), math.rad(25), math.rad(0)), 0.25, true)
  207. M.Animate(Char:findFirstChild("MotorWeapon", true), CFrame.new(0, -1, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)), 0.25, true)
  208. end
  209.  
  210. local FpsPart = Instance.new("Part")
  211. FpsPart.Transparency = 1
  212. FpsPart.Anchored = true
  213. FpsPart.Parent = FpsModel
  214. FpsPart.CanCollide = false
  215. FpsPart.FormFactor = "Custom"
  216. FpsPart.Size = Vector3.new(0.2, 0.2, 0.2)
  217. local FpsWeaponWeld = Instance.new("Motor")
  218. FpsWeaponWeld.Parent = FpsPart
  219. FpsWeaponWeld.Part1 = FpsWeapon
  220. FpsWeaponWeld.Part0 = FpsRArm
  221. FpsWeaponWeld.C1 = CFrame.new(0, 2, 1)
  222. FpsWeaponWeld.C0 = CFrame.new()
  223. local FpsLArmWeld = Instance.new("Motor")
  224. FpsLArmWeld.Parent = FpsLArm
  225. FpsLArmWeld.Part1 = FpsLArm
  226. FpsLArmWeld.Part0 = FpsPart
  227. FpsLArmWeld.C1 = CFrame.new(0.5, 0, 0)
  228. FpsLArmWeld.C0 = CFrame.new(-1, 0.75, 0)
  229. local FpsRArmWeld = Instance.new("Motor")
  230. FpsRArmWeld.Parent = FpsRArm
  231. FpsRArmWeld.Part1 = FpsRArm
  232. FpsRArmWeld.Part0 = FpsPart
  233. FpsRArmWeld.C1 = CFrame.new(-0.5, 0, 0)
  234. FpsRArmWeld.C0 = CFrame.new(1, 0.75, 0)
  235. local energy = 100
  236. local maxEnergy = 100
  237. local move_anim_speed = 20
  238. local last_p = Vector3.new()
  239. local move_amm = 12
  240. local walking = false
  241. local running = false
  242. local walkingStop = true
  243. local aniRun = false
  244. local aniLegs = false
  245. local idle = true
  246. local WalkSpeed = Humanoid.WalkSpeed
  247. Humanoid.WalkSpeed = WalkSpeed
  248. local DB = false
  249. local Charging = false
  250. local Speed = 12
  251. local shake_freq = 5
  252. local CanMelee = true
  253. local CanReload = true
  254. local Shooting = false
  255. local Aimed = false
  256. local Zoomed = false
  257. local RunSpeed = 20
  258. Camera.CameraType = "Custom"
  259. Camera.CameraSubject = Humanoid
  260. coroutine.resume(coroutine.create(function()
  261. while FpsModel ~= nil do
  262. local delta = wait()
  263. local cur_p = T.Position
  264. if (cur_p - last_p).magnitude >= 0.1 then
  265. move_amm = math.min(1, move_amm + delta * move_anim_speed)
  266. walking = true
  267. if running then
  268. if energy <= 0 then
  269. aniRun = false
  270. running = false
  271. shake_freq = 5
  272. Humanoid.WalkSpeed = WalkSpeed
  273. end
  274. elseif energy < maxEnergy then
  275. energy = energy + 0.2
  276. end
  277. else
  278. move_amm = math.max(0, move_amm - delta * move_anim_speed)
  279. walking = false
  280. if energy < maxEnergy then
  281. energy = energy + 0.2
  282. end
  283. end
  284. last_p = cur_p
  285. end
  286. end))
  287. local RightArmWeld, LeftArmWeld, WeaponWeld
  288. local Cloaked = false
  289. local UserInputService = game:GetService("UserInputService")
  290. local Mobile = UserInputService.TouchEnabled
  291. if UserInputService.KeyboardEnabled then
  292. Mobile = false
  293. end
  294. runService.RenderStepped:connect(function()
  295. local last_time = tick()
  296. local delta = tick() - last_time
  297. last_time = tick()
  298. local breathe_amp = 1.5
  299. local breathe_freq = 1
  300. local breathe = math.sin(math.rad(tick() * 90 * breathe_freq)) * breathe_amp
  301. local shake_amp = {0.075, 0.075}
  302. local arm_shake = CFrame.new(math.cos(math.rad(tick() * 90 * shake_freq)) * move_amm * shake_amp[1], math.abs(math.cos(math.rad(tick() * 90 * shake_freq)) * move_amm * shake_amp[2]), 0)
  303. if (Head.Position - Camera.CoordinateFrame.p).magnitude < 2.5 and Selected then
  304. if Cloaked then
  305. FpsLArm.Transparency = 0.5
  306. FpsRArm.Transparency = 0.5
  307. FpsWeapon.Transparency = 0.5
  308. else
  309. FpsLArm.Transparency = 0
  310. FpsRArm.Transparency = 0
  311. FpsWeapon.Transparency = 0
  312. end
  313. FPS = true
  314. else
  315. FpsLArm.Transparency = 1
  316. FpsRArm.Transparency = 1
  317. FpsWeapon.Transparency = 1
  318. FPS = false
  319. end
  320. if FpsModel ~= nil and Char ~= nil and 0 < Humanoid.Health then
  321. if WeaponType == "Gun" then
  322. FpsPart.CFrame = Camera.CoordinateFrame * CFrame.new(0.7, -2, -0.4) * CFrame.Angles(math.rad(0 + breathe / 2), math.rad(0), math.rad(0)) * arm_shake
  323. end
  324. if RightArmWeld ~= nil and LeftArmWeld ~= nil and WeaponWeld ~= nil then
  325. if WeaponType == "Gun" then
  326. FpsLArmWeld.C1 = LeftArmWeld.C1 * CFrame.new(0.15, 0.09, -0.43) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-5))
  327. FpsRArmWeld.C1 = RightArmWeld.C1
  328. FpsWeaponWeld.C1 = WeaponWeld.C1 * CFrame.new(0.1, -0.2, 0.25)
  329. end
  330. end
  331. end
  332. end)
  333. local debouncetime = 0
  334. local lastjump = time()
  335. local WeaponMesh
  336. local used = false
  337. local Perk = PERKY
  338. Humanoid.Changed:connect(function(prop)
  339. if Perk == "Kevlar" and (Humanoid.Health == 98 or Humanoid.Health == 1398) and not used then
  340. Player.PlayerGui.Sounds.KevlarHurt:Play()
  341. used = true
  342. end
  343. end)
  344. local GunSkin = "http://www.roblox.com/asset/?id=79401500"
  345. local KnifeSkin = "http://www.roblox.com/asset/?id=130252453"
  346. local Charged = false
  347. local MouseDown = false
  348. local DB2 = false
  349. local Ability = ABIL
  350. local Gamemode
  351. local CanCloak = true
  352. local Knife = false
  353. local Gun = false
  354. local ThrowGui = Player.PlayerGui.GUI.ThrowKnife
  355. local CloakGui = Player.PlayerGui.GUI.CloakGui
  356. local Crosshair = Player.PlayerGui.GUI.MobileCrosshair
  357. local Gui = Player.PlayerGui.GUI
  358. game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(c)
  359. if c.Name == "Gun" and not Gun then
  360. spawn(function()
  361. Gamemode = game.ReplicatedStorage.RemoteFunction:InvokeServer("Gamemode")
  362. Perk = game.ReplicatedStorage.RemoteFunction:InvokeServer("Perk")
  363. end)
  364. local Skin = game.ReplicatedStorage.RemoteFunction:InvokeServer("Skin", "Gun")
  365. if Skin ~= nil then
  366. GunSkin = Skin
  367. end
  368. if game.Players.LocalPlayer.Backpack:findFirstChild("Gun") ~= nil then
  369. Gun = true
  370. if Mobile then
  371. else
  372. GT.Activated:connect(function()
  373. if Gamemode == "One In The Chamber" and Char.Bullet.Value == false then
  374. return
  375. end
  376. if not DB then
  377. DB = false
  378. WC.ShootGun(Char, Char, Mouse.Hit.p)
  379. AniShootGun()
  380. wait(0.21)
  381. AniReloadGun()
  382. if not Selected then
  383. wait()
  384. end
  385. wait(0.1)
  386. DB = false
  387. end
  388. end)
  389. end
  390. GT.Equipped:connect(function()
  391. Selected = true
  392. WeaponType = "Gun"
  393. Mouse.Icon = "http://www.roblox.com/asset/?id=117431027"
  394. WC.EquipGun(Char, Char, GunSkin)
  395. RightArmWeld = Char:WaitForChild("MotorRight Arm")
  396. LeftArmWeld = Char:WaitForChild("MotorLeft Arm")
  397. WeaponWeld = Char:WaitForChild("MotorWeapon")
  398. WeaponMesh = Char:WaitForChild("Weapon"):findFirstChild("Mesh"):clone()
  399. WeaponMesh.Parent = FpsWeapon
  400. AniEquipGun()
  401. end)
  402. GT.Unequipped:connect(function()
  403. Selected = false
  404. Mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
  405. if WeaponMesh ~= nil then
  406. WeaponMesh:Destroy()
  407. end
  408. WeaponType = nil
  409. WC.Unequip(Char, Char)
  410. end)
  411. end
  412. local Skin = game.ReplicatedStorage.RemoteFunction:InvokeServer("Skin", "Knife")
  413. if Skin ~= nil then
  414. KnifeSkin = Skin
  415. end
  416. if game.Players.LocalPlayer.Backpack:findFirstChild("Knife") ~= nil then
  417. Knife = true
  418. KT.Activated:connect(function()
  419. MouseDown = true
  420. spawn(function()
  421. if Cloaked then
  422. WC.UnCloak(Char, Char)
  423. Cloaked = false
  424. end
  425. end)
  426. if Gamemode == "Infected" or Gamemode == "One In The Chamber" then
  427. return
  428. end
  429. if not DB2 and not DB then
  430. DB2 = true
  431. spawn(function()
  432. wait(0.35)
  433. if MouseDown and not DB then
  434. DB2 = true
  435. if Perk ~= "Quick Hands" then
  436. AniChargeKnife()
  437. wait(.1)
  438. else
  439. AniChargeKnife2()
  440. wait(.1)
  441. end
  442. if MouseDown and not DB then
  443. Charged = true
  444. end
  445. wait(0.5)
  446. DB2 = false
  447. else
  448. DB2 = false
  449. end
  450. end)
  451. end
  452. end)
  453. KT.Deactivated:connect(function()
  454. MouseDown = false
  455. if Charged then
  456. DB = true
  457. DB2 = true
  458. Charged = false
  459. spawn(function()
  460.  
  461. WC.ThrowKnife(Char, Char, Mouse.Hit.p, Ability)
  462. end)
  463. AniThrowKnife()
  464. wait(0.3)
  465. AniEquipKnife()
  466. DB = false
  467. DB2 = false
  468. elseif not DB then
  469. DB = true
  470. do
  471. local Ran = math.random(1, 3)
  472. spawn(function()
  473. WC.StabKnife(Char, Char, Ran, Ability)
  474. end)
  475. if Ran == 1 then
  476. AniSlashKnife1()
  477. elseif Ran == 2 then
  478. AniSlashKnife2()
  479. elseif Ran == 3 then
  480. AniSlashKnife3()
  481. elseif Ran == 4 then
  482. AniSlashKnife4()
  483. end
  484. wait(0.25)
  485. DB = false
  486. end
  487. end
  488. end)
  489. KT.Equipped:connect(function()
  490. Selected = true
  491. WeaponType = "Knife"
  492. Mouse.Icon = "http://www.roblox.com/asset/?id=117431027"
  493. WC.EquipKnife(Char, Char, KnifeSkin)
  494. RightArmWeld = Char:WaitForChild("MotorRight Arm")
  495. LeftArmWeld = Char:WaitForChild("MotorLeft Arm")
  496. WeaponWeld = Char:WaitForChild("MotorWeapon")
  497. WeaponMesh = Char:WaitForChild("Weapon"):findFirstChild("Mesh"):clone()
  498. WeaponMesh.Parent = FpsWeapon
  499. AniEquipKnife()
  500. if Char then
  501. if workspace.GameInProgress.Mode.Value ~= "Infected" then
  502. Char.Humanoid.WalkSpeed = 20
  503. if workspace.GameInProgress.Mode.Value == "Cold Killer" then
  504. Char.Humanoid.WalkSpeed = 20
  505. elseif Perk == "Speedy Gonzales" then
  506. Char.Humanoid.WalkSpeed = 25
  507. else
  508. Char.Humanoid.WalkSpeed = 20
  509. end
  510. else
  511. Char.Humanoid.WalkSpeed = 13
  512. end
  513. end
  514. end)
  515.  
  516. Charged = false
  517. MouseDown = false
  518. Selected = false
  519. Mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
  520. if WeaponMesh ~= nil then
  521. WeaponMesh:Destroy()
  522. end
  523. WeaponType = nil
  524. WC.Unequip(Char, Char)
  525. if workspace.GameInProgress.Mode.Value ~= "Infected" then
  526. Char.Humanoid.WalkSpeed = 16
  527. else
  528. Char.Humanoid.WalkSpeed = 13
  529. end
  530. if Cloaked then
  531. WC.UnCloak(Char, Char)
  532. Cloaked = false
  533. end
  534. end
  535. end
  536. end)
  537. local DB3 = false
  538. IS.InputBegan:connect(function(input, chatting)
  539. if input.UserInputType == Enum.UserInputType.Gamepad1 and input.UserInputState == Enum.UserInputState.Begin and not chatting and Selected and input.KeyCode == Enum.KeyCode.ButtonX and WeaponType == "Knife" and CanCloak and Perk == "Shadow Cloak" then
  540. if Gamemode == "Infected" or Gamemode == "One In The Chamber" then
  541. return
  542. end
  543. CanCloak = false
  544. WC.Cloak(Char, Char)
  545. Cloaked = true
  546. wait(10)
  547. if Cloaked then
  548. WC.UnCloak(Char, Char)
  549. Cloaked = false
  550. end
  551. wait(15)
  552. CanCloak = true
  553. end
  554. if input.UserInputType == Enum.UserInputType.Keyboard and input.UserInputState == Enum.UserInputState.Begin and not chatting and Selected then
  555. if input.KeyCode == Enum.KeyCode.E and WeaponType == "Knife" and not DB3 then
  556. if Gamemode == "Infected" or Gamemode == "One In The Chamber" then
  557. return
  558. end
  559. DB3 = true
  560. spawn(function()
  561. if Cloaked then
  562. WC.UnCloak(Char, Char)
  563. Cloaked = false
  564. end
  565. end)
  566. if not DB2 and not DB then
  567. DB2 = true
  568. if not DB then
  569. DB2 = true
  570. DB = true
  571. if Perk ~= "Quick Hands" then
  572. AniChargeKnife()
  573. wait(.1)
  574. else
  575. AniChargeKnife2()
  576. wait(.1)
  577. end
  578. spawn(function()
  579. WC.ThrowKnife(Char, Char, Mouse.Hit.p, Ability)
  580. end)
  581. AniThrowKnife()
  582. wait(0.3)
  583. AniEquipKnife()
  584. DB = false
  585. DB2 = false
  586. else
  587. DB2 = false
  588. end
  589. end
  590. wait(0.25)
  591. DB3 = false
  592. elseif input.KeyCode == Enum.KeyCode.Q and WeaponType == "Knife" and CanCloak and Perk == "Shadow Cloak" then
  593. if Gamemode == "Infected" or Gamemode == "One In The Chamber" then
  594. return
  595. end
  596. CanCloak = false
  597. WC.Cloak(Char, Char)
  598. Cloaked = true
  599. wait(10)
  600. if Cloaked then
  601. WC.UnCloak(Char, Char)
  602. Cloaked = false
  603. end
  604. wait(15)
  605. CanCloak = true
  606. end
  607. end
  608. end)
  609. game.Players.ChildAdded:connect(function(c)
  610. wait(3)
  611. repeat
  612. wait()
  613. until not DB and not DB2 and not MouseDown
  614. if WeaponType == "Gun" then
  615. WC.EquipGun(Char, Char, GunSkin)
  616. AniEquipGun()
  617. elseif WeaponType == "Knife" then
  618. WC.EquipKnife(Char, Char, KnifeSkin)
  619. AniEquipKnife()
  620. end
  621. end)
Add Comment
Please, Sign In to add comment