Advertisement
zachhy

Untitled

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