zachhy

Untitled

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