KeroroGunso0

knives

Mar 2nd, 2016
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.08 KB | None | 0 0
  1. Players = game:GetService("Players")
  2. Me = Players.LocalPlayer
  3. Char = Me.Character
  4. Neck0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  5. Neck1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  6. Selected = false
  7. Attacking = false
  8. Running = false
  9. Debounce = true
  10. Hurt = false
  11. ModelName = "Weapon"
  12. ToolName = "Weapon"
  13. Speed = 25
  14.  
  15. Attacks = {"q", "e"}
  16.  
  17. Find = function(tab, arg)
  18. for _,v in pairs(tab) do
  19. if v==arg then
  20. return true
  21. end
  22. end
  23. return false
  24. end
  25.  
  26. ContentProvider = game:GetService("ContentProvider")
  27.  
  28. V3 = Vector3.new
  29. C3 = Color3.new
  30. BN = BrickColor.new
  31. CN = CFrame.new
  32. CA = CFrame.Angles
  33. MR = math.rad
  34. MRA = math.random
  35. MP = math.pi
  36. MH = math.huge
  37. UD = UDim2.new
  38.  
  39. function RC(Pos, Dir, Max, Ignore)
  40. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
  41. end
  42.  
  43. function RayC(Start, En, MaxDist, Ignore)
  44. return RC(Start, (En - Start), MaxDist, Ignore)
  45. end
  46.  
  47. function ComputePos(pos1, pos2)
  48. return CN(pos1, V3(pos2.x, pos1.y, pos2.z))
  49. end
  50.  
  51. function DetectSurface(pos, part)
  52. local surface = nil
  53. local pospos = part.CFrame
  54. local pos2 = pospos:pointToObjectSpace(pos)
  55. local siz = part.Size
  56. local shaep = part.Shape
  57. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
  58. surface = {"Anything", CN(pospos.p, pos)*CN(0, 0, -(pospos.p - pos).magnitude)*CA(MR(-90), 0, 0)}
  59. else
  60. if pos2.Y > ((siz.Y/2)-0.04) then
  61. surface = {"Top", CA(0, 0, 0)}
  62. elseif pos2.Y < -((siz.Y/2)-0.04) then
  63. surface = {"Bottom", CA(-MP, 0, 0)}
  64. elseif pos2.X > ((siz.X/2)-0.04) then
  65. surface = {"Right", CA(0, 0, MR(-90))}
  66. elseif pos2.X < -((siz.X/2)-0.04) then
  67. surface = {"Left", CA(0, 0, MR(90))}
  68. elseif pos2.Z > ((siz.Z/2)-0.04) then
  69. surface = {"Back", CA(MR(90), 0, 0)}
  70. elseif pos2.Z < -((siz.Z/2)-0.04) then
  71. surface = {"Front", CA(MR(-90), 0, 0)}
  72. end
  73. end
  74. return surface
  75. end
  76.  
  77. function Compute(pos1, pos2)
  78. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  79. return CN(pos1, pos3)
  80. end
  81.  
  82. function waitChild(n, p)
  83. local c = p:findFirstChild(n)
  84. if c then return c end
  85. while true do
  86. c = p.ChildAdded:wait()
  87. if c.Name == n then return c end
  88. end
  89. end
  90.  
  91. function Notime(func)
  92. coroutine.resume(coroutine.create(function()
  93. func()
  94. end))
  95. end
  96.  
  97. Torso = waitChild("Torso", Char)
  98. Head = waitChild("Head", Char)
  99. Rarm = waitChild("Right Arm", Char)
  100. Larm = waitChild("Left Arm", Char)
  101. Rleg = waitChild("Right Leg", Char)
  102. Lleg = waitChild("Left Leg", Char)
  103. Neck = waitChild("Neck", Torso)
  104. Hum = waitChild("Humanoid", Char)
  105.  
  106. RSH = waitChild("Right Shoulder", Torso)
  107. LSH = waitChild("Left Shoulder", Torso)
  108. RH = waitChild("Right Hip", Torso)
  109. LH = waitChild("Left Hip", Torso)
  110.  
  111. RSH.Part0 = Torso
  112. LSH.Part0 = Torso
  113. RH.Part0 = Torso
  114. LH.Part0 = Torso
  115.  
  116. Add = {
  117. Mesh = function(P, Type, ID, Scale, Tex)
  118. local m = Instance.new("SpecialMesh")
  119. m.MeshType = Type or "Head"
  120. m.MeshId = ID or ""
  121. m.Scale = Scale or V3(1, 1, 1)
  122. m.TextureId = Tex or ""
  123. m.Parent = P
  124. return m
  125. end,
  126. Cylinder = function(P, Scale)
  127. local m = Instance.new("CylinderMesh")
  128. m.Scale = Scale or V3(1, 1, 1)
  129. m.Parent = P
  130. return m
  131. end,
  132. Block = function(P, Scale)
  133. local m = Instance.new("BlockMesh")
  134. m.Scale = Scale or V3(1, 1, 1)
  135. m.Parent = P
  136. return m
  137. end,
  138. BP = function(P, Pos, Power)
  139. local bp = Instance.new("BodyPosition")
  140. bp.P = Power
  141. bp.position = Pos
  142. bp.maxForce = V3(MH, MH, MH)
  143. bp.Parent = P
  144. return bp
  145. end,
  146. }
  147.  
  148. Sounds = {
  149. Shoot = {Id = "http://www.roblox.com/asset/?id=2697431", Pitch = 0.3, Volume = 0.5},
  150. Boom = {Id = "http://www.roblox.com/asset/?id=2692806", Pitch = 0.55, Volume = 0.4},
  151. Slash = {Id = "rbxasset://sounds//swordslash.wav", Pitch = 0.5, Volume = 0.5},
  152. Hit = {Id = "http://www.roblox.com/asset/?id=2801263", Pitch = 0.85, Volume = 0.35},
  153. Reload = {Id = "rbxasset://sounds\\metal.ogg", Pitch = 1, Volume = 0.45},
  154. }
  155.  
  156. for _,v in pairs(Sounds) do
  157. ContentProvider:Preload(v.Id)
  158. end
  159.  
  160. function PlaySound(Sound, bool)
  161. local s = Instance.new("Sound")
  162. s.Looped = false
  163. s.Volume = Sound.Volume
  164. s.SoundId = Sound.Id
  165. if bool then
  166. s.Pitch = MRA((Sound.Pitch*0.75)*1000, (Sound.Pitch*1.15)*1000)/1000
  167. else
  168. s.Pitch = Sound.Pitch
  169. end
  170. s.PlayOnRemove = true
  171. s.Parent = Torso
  172. Notime(function()
  173. wait()
  174. s.Parent = nil
  175. end)
  176. end
  177.  
  178. function GetParts(pos, dist)
  179. local parts = {}
  180. local function o(p)
  181. for _,v in pairs(p:children()) do
  182. if v:IsA("BasePart") then
  183. if (pos - v.Position).magnitude <= dist then
  184. table.insert(parts, {v, (pos - v.Position).magnitude, v.Anchored})
  185. end
  186. end
  187. o(v)
  188. end
  189. end
  190. o(workspace)
  191. return parts
  192. end
  193.  
  194. function GetHum(P)
  195. for _,v in pairs(P:children()) do
  196. if v:IsA("Humanoid") then
  197. if v.Health > 0 then
  198. return v
  199. end
  200. end
  201. end
  202. end
  203.  
  204. function GetGroup(Pos, Distance, Hit)
  205. local tab = {}
  206. for _,v in pairs(workspace:children()) do
  207. local h = GetHum(v)
  208. local t = v:findFirstChild("Torso")
  209. if h and t and v ~= Hit.Parent then
  210. if (t.Position - Pos).magnitude <= Distance then
  211. table.insert(tab, {h, v, (t.Position - Pos).magnitude})
  212. end
  213. end
  214. end
  215. if Hit then
  216. local h = GetHum(Hit.Parent)
  217. if h then
  218. table.insert(tab, {h, Hit.Parent, 0})
  219. end
  220. end
  221. return tab
  222. end
  223.  
  224. function Part(Par, Anc, Colli, Tran, Ref, Col, Siz)
  225. local p = Instance.new("Part")
  226. p.formFactor = "Custom"
  227. p.TopSurface = 0
  228. p.BottomSurface = 0
  229. p.Transparency = Tran
  230. p.Reflectance = Ref
  231. p.Anchored = Anc
  232. p.CanCollide = Colli
  233. p.BrickColor = Col
  234. p.Size = Siz
  235. p.Locked = true
  236. p.Parent = Par
  237. p:BreakJoints()
  238. return p
  239. end
  240.  
  241. function Weld(P0, P1, C0, C1)
  242. local w = Instance.new("Weld")
  243. w.Part0 = P0
  244. w.Part1 = P1
  245. if C0 then
  246. w.C0 = C0
  247. end
  248. if C1 then
  249. w.C1 = C1
  250. end
  251. w.Parent = P0
  252. return w
  253. end
  254.  
  255. for _,v in pairs(Char:children()) do
  256. if v.Name == ModelName then
  257. v:remove()
  258. end
  259. end
  260.  
  261. Model = Instance.new("Model")
  262. Model.Name = ModelName
  263.  
  264. FTorso = Part(Model, false, false, 1, 0, Torso.BrickColor, V3(2, 2, 1))
  265. FW = Weld(Torso, FTorso)
  266.  
  267. RAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  268. LAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  269. RLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  270. LLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  271.  
  272. RABW = Weld(Torso, RAB, CN(), CN(-1.5, -0.5, 0))
  273. LABW = Weld(Torso, LAB, CN(), CN(1.5, -0.5, 0))
  274. RLBW = Weld(Torso, RLB, CN(), CN(-0.5, 1, 0))
  275. LLBW = Weld(Torso, LLB, CN(), CN(0.5, 1, 0))
  276.  
  277. RAW = Weld(RAB, nil, CN(), CN(0, 0.5, 0))
  278. LAW = Weld(LAB, nil, CN(), CN(0, 0.5, 0))
  279. RLW = Weld(RLB, nil, CN(), CN(0, 1, 0))
  280. LLW = Weld(LLB, nil, CN(), CN(0, 1, 0))
  281. FNeck = Weld(FTorso, nil, CN(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), CN(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
  282. TW = Weld(Torso, nil, CN(0.7, 0.8, 1.2), CA(0, MR(180), MR(55)))
  283.  
  284. Weapon = Instance.new("Model")
  285. Weapon.Name = "Weapon"
  286.  
  287. HBR = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  288. HBWR = Weld(Rarm, HBR, CN(0, -0.9, 0), CA(MR(90), 0, 0))
  289. HWR = Weld(HBR, nil)
  290.  
  291. HBL = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  292. HBWL = Weld(Larm, HBL, CN(0, -0.9, 0), CA(MR(90), 0, 0))
  293. HWL = Weld(HBL, nil)
  294.  
  295. Limbs = {Rarm = {RAW, Rarm}, Larm = {LAW, Larm}, Rleg = {RLW, Rleg}, Lleg = {LLW, Lleg}, }
  296.  
  297. function Atta(Lol)
  298. Lol[1].Part1 = Lol[2]
  299. end
  300.  
  301. function MakeKnife(Arm)
  302. local Parts = {}
  303. local Handle = Part(Weapon, false, false, 0, 0, BN("Navy blue"), V3(0.35, 1.1, 0.35))
  304. local Derp = Part(Weapon, false, false, 0, 0, BN("Really black"), V3(0.6, 0.2, 0.6))
  305. local Blade1 = Part(Weapon, false, false, 0, 0, BN("Mid gray"), V3(0.2, 0.5, 0.3))
  306. local Blade2 = Part(Weapon, false, false, 0, 0, BN("Mid gray"), V3(0.2, 0.4, 0.4))
  307. local Blade3 = Part(Weapon, false, false, 0, 0, BN("Mid gray"), V3(0.2, 0.8, 0.4))
  308. local Blade4 = Part(Weapon, false, false, 0, 0, BN("Mid gray"), V3(0.2, 0.7, 0.4))
  309. Add.Mesh(Handle)
  310. Add.Cylinder(Derp)
  311. Add.Block(Blade1)
  312. Add.Block(Blade2)
  313. Add.Block(Blade3)
  314. Add.Mesh(Blade4, "Wedge")
  315. Arm.Part1 = Handle
  316. Weld(Handle, Derp, CN(0, -0.5, 0))
  317. Weld(Derp, Blade1, CN(0, -0.25, 0))
  318. Weld(Blade1, Blade2, CN(0, -0.25, -0.04), CA(MR(5), 0, 0))
  319. Weld(Blade2, Blade3, CN(0, -0.55, 0.08), CA(MR(12), 0, 0))
  320. Weld(Blade3, Blade4, CN(0, -0.68, 0.075), CA(MR(-15)+MP, MP, 0))
  321.  
  322. Parts.Handle = Handle
  323. Parts.Derp = Derp
  324. Parts.Blades = {Blade1, Blade2, Blade3, Blade4}
  325. return Parts
  326. end
  327.  
  328. MakeKnife(HWR)
  329. MakeKnife(HWL)
  330.  
  331. function Show_Damage(P, D)
  332. local mo = Instance.new("Model")
  333. mo.Name = D
  334. local p = Part(mo, false, false, 0, 0, BN("Bright red"), V3(0.2, 0.2, 0.2))
  335. p.Name = "Head"
  336. local m = Instance.new("SpecialMesh")
  337. m.MeshType = "Brick"
  338. m.Scale = Vector3.new(4.5, 2.3, 4.5)
  339. m.Parent = p
  340. local bp = Instance.new("BodyPosition", p)
  341. bp.maxForce = V3(MH, MH, MH)
  342. bp.P = 9001
  343. bp.position = CN(P) * CN(0, 1.5, 0).p
  344. local h = Instance.new("Humanoid")
  345. h.Health = 0
  346. h.MaxHealth = 0
  347. h.Name = "asd"
  348. h.Parent = mo
  349. local nah = true
  350. mo.Parent = workspace
  351. p.CFrame = CN(P)
  352. Notime(function()
  353. wait(1.5)
  354. for i = 0, 1, 0.05 do
  355. p.Transparency = i
  356. if nah then mo.Name = "" nah = false else mo.Name = "- "..D nah = true end
  357. wait()
  358. end
  359. mo:remove()
  360. end)
  361. end
  362.  
  363. Weapon.Parent = Model
  364. Model.Parent = Char
  365.  
  366. if script.Parent.className ~= "HopperBin" then
  367. h = Instance.new("HopperBin", Me.Backpack)
  368. h.Name = ToolName
  369. script.Parent = h
  370. end
  371.  
  372. bin = script.Parent
  373.  
  374. function Attach(t)
  375. RSH.Part0 = t
  376. LSH.Part0 = t
  377. RH.Part0 = t
  378. LH.Part0 = t
  379. RABW.Part0 = t
  380. LABW.Part0 = t
  381. LLBW.Part0 = t
  382. RLBW.Part0 = t
  383. if t == Torso then
  384. FTorso.Transparency = 1
  385. FNeck.Part1 = nil
  386. else
  387. Torso.Transparency = 1
  388. FNeck.Part1 = Head
  389. end
  390. t.Transparency = 0
  391. end
  392.  
  393. function Idle()
  394. local SpeedAtm = Torso.Velocity.magnitude
  395. for i = 0.02, 1, 0.03 do
  396. SpeedAtm = Torso.Velocity.magnitude
  397. if Attacking == true or Selected == false or SpeedAtm > 0.1 then return end
  398. RAW.C0 = CA(MR(-15-6*i), MR(20-2*i), MR(20-3*i))
  399. LAW.C0 = CA(MR(-15-4*i), MR(-20+3*i), MR(-20+4*i))
  400. RLW.C0 = CA(MR(15+4*i), 0, 0) * CN(0.02, 0.4+0.05*i, -0.75)
  401. LLW.C0 = CA(MR(-50-5*i), 0, 0) * CN(-0.02, 0.45, -0.5)
  402. FW.C0 = CN(0, -0.5-0.1*i, 0) * CA(MR(-10-4*i), 0, 0)
  403. FNeck.C0 = Neck0 * CA(MR(20+4*i), 0, 0)
  404. wait()
  405. end
  406. for i = 0.05, 1, 0.05 do
  407. SpeedAtm = Torso.Velocity.magnitude
  408. if Attacking == true or Selected == false or SpeedAtm > 0.1 then return end
  409. RAW.C0 = CA(MR(-21-2*i), MR(18-1*i), MR(17-1*i))
  410. LAW.C0 = CA(MR(-19-1*i), MR(-17+1*i), MR(-16+1*i))
  411. RLW.C0 = CA(MR(19+1*i), 0, 0) * CN(0.02, 0.45+0.02*i, -0.75)
  412. LLW.C0 = CA(MR(-55-2*i), 0, 0) * CN(-0.02, 0.45, -0.5)
  413. FW.C0 = CN(0, -0.6-0.025*i, 0) * CA(MR(-14-1*i), 0, 0)
  414. FNeck.C0 = Neck0 * CA(MR(24+1*i), 0, 0)
  415. wait()
  416. end
  417. for i = 0.04, 1, 0.04 do
  418. SpeedAtm = Torso.Velocity.magnitude
  419. if Attacking == true or Selected == false or SpeedAtm > 0.1 then return end
  420. RAW.C0 = CA(MR(-23+2*i), MR(17+1*i), MR(16+1*i))
  421. LAW.C0 = CA(MR(-20+1*i), MR(-16-1*i), MR(-15-1*i))
  422. RLW.C0 = CA(MR(20-1*i), 0, 0) * CN(0.02, 0.47-0.02*i, -0.75)
  423. LLW.C0 = CA(MR(-57+2*i), 0, 0) * CN(-0.02, 0.45, -0.5)
  424. FW.C0 = CN(0, -0.625+0.025*i, 0) * CA(MR(-15+1*i), 0, 0)
  425. FNeck.C0 = Neck0 * CA(MR(25-1*i), 0, 0)
  426. wait()
  427. end
  428. for i = 0.03, 1, 0.03 do
  429. SpeedAtm = Torso.Velocity.magnitude
  430. if Attacking == true or Selected == false or SpeedAtm > 0.1 then return end
  431. RAW.C0 = CA(MR(-21+4*i), MR(18+2*i), MR(17+2*i))
  432. LAW.C0 = CA(MR(-19+2*i), MR(-17-3*i), MR(-16-3*i))
  433. RLW.C0 = CA(MR(19-3*i), 0, 0) * CN(0.02, 0.45-0.05*i, -0.75)
  434. LLW.C0 = CA(MR(-55+4*i), 0, 0) * CN(-0.02, 0.45, -0.5)
  435. FW.C0 = CN(0, -0.6+0.06*i, 0) * CA(MR(-14+3*i), 0, 0)
  436. FNeck.C0 = Neck0 * CA(MR(24-3*i), 0, 0)
  437. wait()
  438. end
  439. for i = 0.07, 1, 0.07 do
  440. SpeedAtm = Torso.Velocity.magnitude
  441. if Attacking == true or Selected == false or SpeedAtm >= 0.1 then return end
  442. RAW.C0 = CA(MR(-17+2*i), MR(20), MR(19+1*i))
  443. LAW.C0 = CA(MR(-17+2*i), MR(-20), MR(-19-1*i))
  444. RLW.C0 = CA(MR(16-1*i), 0, 0) * CN(0.02, 0.4, -0.75)
  445. LLW.C0 = CA(MR(-51+1*i), 0, 0) * CN(-0.02, 0.45, -0.5)
  446. FW.C0 = CN(0, -0.54+0.04*i, 0) * CA(MR(-11+1*i), 0, 0)
  447. FNeck.C0 = Neck0 * CA(MR(21-1*i), 0, 0)
  448. wait()
  449. end
  450. wait()
  451. end
  452.  
  453. function RunStart()
  454. for i = 0.33, 1, 0.33 do
  455. RAW.C0 = CA(MR(-15-5*i), MR(20-3*i), MR(20-3*i))
  456. LAW.C0 = CA(MR(-15-5*i), MR(-20+3*i), MR(-20+3*i))
  457. wait()
  458. end
  459. for i = 0.2, 1, 0.2 do
  460. RAW.C0 = CA(MR(-20-15*i), MR(17-5*i), MR(17-7*i))
  461. LAW.C0 = CA(MR(-20-15*i), MR(-17+5*i), MR(-17+7*i))
  462. wait()
  463. end
  464. for i = 0.5, 1, 0.5 do
  465. RAW.C0 = CA(MR(-35-5*i), MR(12-2*i), MR(10-2*i))
  466. LAW.C0 = CA(MR(-35-5*i), MR(-12+2*i), MR(-10+2*i))
  467. wait()
  468. end
  469. end
  470.  
  471. function RunEnd()
  472. for i = 0.5, 1, 0.5 do
  473. RAW.C0 = CA(MR(-40+5*i), MR(10+2*i), MR(8+2*i))
  474. LAW.C0 = CA(MR(-40+5*i), MR(-10-2*i), MR(-8-2*i))
  475. wait()
  476. end
  477. for i = 0.2, 1, 0.2 do
  478. RAW.C0 = CA(MR(-35+15*i), MR(12+5*i), MR(10+7*i))
  479. LAW.C0 = CA(MR(-35+15*i), MR(-12-5*i), MR(-10-7*i))
  480. wait()
  481. end
  482. for i = 0.33, 1, 0.33 do
  483. RAW.C0 = CA(MR(-20+5*i), MR(17+3*i), MR(17+3*i))
  484. LAW.C0 = CA(MR(-20+5*i), MR(-17-3*i), MR(-17-3*i))
  485. wait()
  486. end
  487. end
  488.  
  489. function Run()
  490. local SpeedAtm = Torso.Velocity.magnitude
  491. for i = 0.33, 1, 0.33 do
  492. SpeedAtm = Torso.Velocity.magnitude
  493. if Attacking == true or Selected == false or SpeedAtm < 0.1 or Torso.Velocity.Y > 0.5 or Torso.Velocity.Y < -0.5 then return end
  494. RLW.C0 = CA(MR(15-15*i), 0, 0) * CN(0.02, 0.4-0.1*i, -0.75+0.25*i)
  495. LLW.C0 = CA(MR(-50+15*i), 0, 0) * CN(-0.02, 0.45+0.3*i, -0.5)
  496. FW.C0 = CN(0, -0.5+0.2*i, 0) * CA(MR(-10+2*i), 0, 0)
  497. wait()
  498. end
  499. for i = 0.25, 1, 0.25 do
  500. SpeedAtm = Torso.Velocity.magnitude
  501. if Attacking == true or Selected == false or SpeedAtm < 0.1 or Torso.Velocity.Y > 0.5 or Torso.Velocity.Y < -0.5 then return end
  502. RLW.C0 = CA(MR(-60*i), 0, 0) * CN(0.02, 0.3-0.25*i, -0.5+0.75*i)
  503. LLW.C0 = CA(MR(-35+45*i), 0, 0) * CN(-0.02, 0.75+0.4*i, -0.5-0.2*i)
  504. FW.C0 = CN(0, -0.3+0.2*i, 0) * CA(MR(-8+1*i), 0, 0)
  505. wait()
  506. end
  507. for i = 0.5, 1, 0.5 do
  508. SpeedAtm = Torso.Velocity.magnitude
  509. if Attacking == true or Selected == false or SpeedAtm < 0.1 or Torso.Velocity.Y > 0.5 or Torso.Velocity.Y < -0.5 then return end
  510. RLW.C0 = CA(MR(-60-5*i), 0, 0) * CN(0.02, 0.05-0.1*i, 0.25+0.1*i)
  511. LLW.C0 = CA(MR(10+5*i), 0, 0) * CN(-0.02, 1.15-0.15*i, -0.7-0.05*i)
  512. FW.C0 = CN(0, -0.1+0.05*i, 0) * CA(MR(-7+1*i), 0, 0)
  513. wait()
  514. end
  515. for i = 0.33, 1, 0.33 do
  516. SpeedAtm = Torso.Velocity.magnitude
  517. if Attacking == true or Selected == false or SpeedAtm < 0.1 or Torso.Velocity.Y > 0.5 or Torso.Velocity.Y < -0.5 then return end
  518. RLW.C0 = CA(MR(-65+30*i), 0, 0) * CN(0.02, -0.05+0.5*i, 0.35-0.2*i)
  519. LLW.C0 = CA(MR(15-10*i), 0, 0) * CN(-0.02, 1-0.5*i, -0.75+0.1*i)
  520. FW.C0 = CN(0, -0.05-0.6*i, 0) * CA(MR(-6-3*i), 0, 0)
  521. wait()
  522. end
  523. for i = 0.25, 1, 0.25 do
  524. SpeedAtm = Torso.Velocity.magnitude
  525. if Attacking == true or Selected == false or SpeedAtm < 0.1 or Torso.Velocity.Y > 0.5 or Torso.Velocity.Y < -0.5 then return end
  526. RLW.C0 = CA(MR(-35+40*i), 0, 0) * CN(0.02, 0.45+0.9*i, 0.15-0.6*i)
  527. LLW.C0 = CA(MR(5-55*i), 0, 0) * CN(-0.02, 0.5-0.6*i, -0.65+0.8*i)
  528. FW.C0 = CN(0, -0.65+0.4*i, 0) * CA(MR(-9-3*i), 0, 0)
  529. wait()
  530. end
  531. for i = 0.33, 1, 0.33 do
  532. SpeedAtm = Torso.Velocity.magnitude
  533. if Attacking == true or Selected == false or SpeedAtm < 0.1 or Torso.Velocity.Y > 0.1 then return end
  534. RLW.C0 = CA(MR(5+10*i), 0, 0) * CN(0.02, 1.35-0.95*i, -0.45-0.3*i)
  535. LLW.C0 = CA(MR(-50), 0, 0) * CN(-0.02, -0.1+0.55*i, 0.15-0.7*i)
  536. FW.C0 = CN(0, -0.25-0.35*i, 0) * CA(MR(-12+2*i), 0, 0)
  537. wait()
  538. end
  539. end
  540.  
  541. coroutine.resume(coroutine.create(function()
  542. while true do
  543. local SpeedAtm = Torso.Velocity.magnitude
  544. if Attacking == false and Selected or Torso.Velocity.Y > 0.5 or Torso.Velocity.Y < -0.5 then
  545. if SpeedAtm < 0.1 then
  546. Idle()
  547. RAW.C0 = CA(MR(-15), MR(20), MR(20))
  548. LAW.C0 = CA(MR(-15), MR(-20), MR(-20))
  549. RLW.C0 = CA(MR(15), 0, 0) * CN(0.02, 0.4, -0.75)
  550. LLW.C0 = CA(MR(-50), 0, 0) * CN(-0.02, 0.45, -0.5)
  551. HWR.C0 = CN()
  552. HWL.C0 = CN()
  553. FW.C0 = CN(0, -0.5, 0) * CA(MR(-10), 0, 0)
  554. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  555. else
  556. Run()
  557. end
  558. end
  559. wait()
  560. end
  561. end))
  562.  
  563. Notime(function()
  564. local Last = Torso.Velocity.magnitude > 0.1
  565. while true do
  566. Running = Torso.Velocity.magnitude > 0.1
  567. if Torso.Velocity.Y < 0.5 or Torso.Velocity.Y > -0.5 and Attacking == false and Selected then
  568. if Running ~= Last then
  569. Last = Running
  570. if Running then
  571. RunStart()
  572. else
  573. RunEnd()
  574. end
  575. end
  576. end
  577. wait()
  578. end
  579. end)
  580.  
  581. function Jump()
  582. Attacking = true
  583. --Hum.PlatformStand = true
  584. for i = 0.5, 1, 0.5 do
  585. RAW.C0 = CA(MR(-15+10*i), MR(20-5*i), MR(20-3*i))
  586. LAW.C0 = CA(MR(-15+10*i), MR(-20+5*i), MR(-20+3*i))
  587. RLW.C0 = CA(MR(15-10*i), 0, 0) * CN(0.02, 0.4-0.2*i, -0.75+0.35*i)
  588. LLW.C0 = CA(MR(-50+20*i), 0, 0) * CN(-0.02, 0.45-0.3*i, -0.5+0.5*i)
  589. HWR.C0 = CA(MR(10*i), 0, 0)
  590. HWL.C0 = CA(MR(10*i), 0, 0)
  591. FW.C0 = CN(0, -0.5+0.05*i, 0) * CA(MR(-10-2*i), 0, 0)
  592. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  593. wait()
  594. end
  595. local bp = Add.BP(Torso, Torso.Position, 10000)
  596. local Face = Compute(Torso.Position, Torso.CFrame * CN(0, 0, -10).p)
  597. local Dist = 13
  598. local Center = Face * CN(0, 0, -Dist) + V3(0, -Dist/2, 0)
  599. --bp.position = Center * CA(MR(150-120*i), 0, 0) * CN(0, 0, -Dist).p
  600. for i = 0.33, 1, 0.33 do
  601. RAW.C0 = CA(MR(-5+80*i), MR(15-20*i), MR(17-12*i))
  602. LAW.C0 = CA(MR(-5+80*i), MR(-15+20*i), MR(-17+12*i))
  603. RLW.C0 = CA(MR(10-10*i), 0, 0) * CN(0.02, 0.2-0.2*i, -0.45+0.45*i)
  604. LLW.C0 = CA(MR(-40+40*i), 0, 0) * CN(-0.02, 0.15-0.15*i, -0.25+0.25*i)
  605. HWR.C0 = CA(MR(10+25*i), 0, 0)
  606. HWL.C0 = CA(MR(10+25*i), 0, 0)
  607. FW.C0 = CN(0, -0.45+0.45*i, 0) * CA(MR(-12-13*i), 0, 0)
  608. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  609. bp.position = Center * CA(MR(150-10*i), 0, 0) * CN(0, 0, -Dist).p
  610. wait()
  611. end
  612. for i = 0.2, 1, 0.2 do
  613. RAW.C0 = CA(MR(75+60*i), MR(-5), MR(5))
  614. LAW.C0 = CA(MR(75+60*i), MR(5), MR(-5))
  615. RLW.C0 = CA(0, 0, 0) * CN(0.02, 0.25*i, 0)
  616. LLW.C0 = CA(0, 0, 0) * CN(-0.02, 0.25*i, 0)
  617. HWR.C0 = CA(MR(35+20*i), 0, 0)
  618. HWL.C0 = CA(MR(35+20*i), 0, 0)
  619. FW.C0 = CA(MR(-25-35*i), 0, 0)
  620. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  621. bp.position = Center * CA(MR(140-50*i), 0, 0) * CN(0, 0, -Dist).p
  622. wait()
  623. end
  624. for i = 0.5, 1, 0.5 do
  625. RAW.C0 = CA(MR(135+15*i), MR(-5), MR(5))
  626. LAW.C0 = CA(MR(135+15*i), MR(5), MR(-5))
  627. RLW.C0 = CA(MR(-5*i), 0, 0) * CN(0.02, 0.25+0.4*i, -0.45*i)
  628. LLW.C0 = CA(MR(-5*i), 0, 0) * CN(-0.02, 0.25+0.4*i, -0.45*i)
  629. FW.C0 = CA(MR(-60-15*i), 0, 0)
  630. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  631. bp.position = Center * CA(MR(90-10*i), 0, 0) * CN(0, 0, -Dist).p
  632. wait()
  633. end
  634. Hurt = true
  635. Deb = true
  636. for i = 0.15, 1, 0.15 do
  637. RAW.C0 = CA(MR(150-120*i), MR(-5), MR(5))
  638. LAW.C0 = CA(MR(150-120*i), MR(5), MR(-5))
  639. RLW.C0 = CA(MR(-5-20*i), 0, 0) * CN(0.02, 0.65+0.6*i, -0.45-0.45*i)
  640. LLW.C0 = CA(MR(-5-20*i), 0, 0) * CN(-0.02, 0.65+0.5*i, -0.45-0.45*i)
  641. HWR.C0 = CA(MR(55-60*i), 0, 0)
  642. HWL.C0 = CA(MR(55-60*i), 0, 0)
  643. FW.C0 = CA(MR(-75-130*i), 0, 0)
  644. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  645. bp.position = Center * CA(MR(80-30*i), 0, 0) * CN(0, 0, -Dist).p
  646. wait()
  647. end
  648. Hurt = false
  649. Hum.PlatformStand = false
  650. bp:remove()
  651. Attacking = false
  652. end
  653.  
  654. function SelectAnim()
  655. Atta(Limbs.Rarm)
  656. Atta(Limbs.Larm)
  657. Attach(FTorso)
  658. for i = 0.33, 1, 0.33 do
  659. RAW.C0 = CA(MR(10*i), MR(4*i), MR(3*i))
  660. LAW.C0 = CA(MR(10*i), MR(-4*i), MR(-3*i))
  661. HWR.C0 = CN(0.15*i, 0, 0) * CA(MR(-35*i), 0, 0)
  662. HWL.C0 = CN(-0.15*i, 0, 0) * CA(MR(-35*i), 0, 0)
  663. FW.C0 = CA(MR(3*i), 0, 0)
  664. FNeck.C0 = Neck0 * CA(MR(-5*i), 0, 0)
  665. wait()
  666. end
  667. for i = 0.2, 1, 0.2 do
  668. RAW.C0 = CA(MR(10+50*i), MR(4+16*i), MR(3+7*i))
  669. LAW.C0 = CA(MR(10+50*i), MR(-4-16*i), MR(-3-7*i))
  670. HWR.C0 = CN(0.15+0.25*i, 0, 0) * CA(MR(-35-180*i), 0, 0)
  671. HWL.C0 = CN(-0.15-0.25*i, 0, 0) * CA(MR(-35-180*i), 0, 0)
  672. FW.C0 = CA(MR(3+7*i), 0, 0)
  673. FNeck.C0 = Neck0 * CA(MR(-5-15*i), 0, 0)
  674. wait()
  675. end
  676. for i = 0.25, 1, 0.25 do
  677. RAW.C0 = CA(MR(60+12*i), MR(20), MR(10+3*i))
  678. LAW.C0 = CA(MR(60+12*i), MR(-20), MR(-10-3*i))
  679. HWR.C0 = CN(0.4+0.05*i, 0, 0) * CA(MR(-215-180*i), 0, 0)
  680. HWL.C0 = CN(-0.4-0.05*i, 0, 0) * CA(MR(-215-180*i), 0, 0)
  681. FW.C0 = CA(MR(10+2*i), 0, 0)
  682. FNeck.C0 = Neck0 * CA(MR(-20-2*i), 0, 0)
  683. wait()
  684. end
  685. Atta(Limbs.Rleg)
  686. Atta(Limbs.Lleg)
  687. for i = 0.2, 1, 0.2 do
  688. RAW.C0 = CA(MR(72-80*i), MR(20), MR(13+7*i))
  689. LAW.C0 = CA(MR(72-80*i), MR(-20), MR(-13-7*i))
  690. RLW.C0 = CA(MR(10*i), 0, 0) * CN(0, 0.3*i, -0.7*i)
  691. LLW.C0 = CA(MR(-40*i), 0, 0) * CN(0, 0.4*i, -0.4*i)
  692. HWR.C0 = CN(0.45-0.35*i, 0, 0) * CA(MR(-35-290*i), 0, 0)
  693. HWL.C0 = CN(-0.45+0.35*i, 0, 0) * CA(MR(-35-290*i), 0, 0)
  694. FW.C0 = CN(0, -0.4*i, 0) * CA(MR(12-18*i), 0, 0)
  695. FNeck.C0 = Neck0 * CA(MR(-22+18*i), 0, 0)
  696. wait()
  697. end
  698. for i = 0.5, 1, 0.5 do
  699. RAW.C0 = CA(MR(-8-7*i), MR(20), MR(20))
  700. LAW.C0 = CA(MR(-8-7*i), MR(-20), MR(-20))
  701. RLW.C0 = CA(MR(10+5*i), 0, 0) * CN(0.02*i, 0.3+0.1*i, -0.7-0.05*i)
  702. LLW.C0 = CA(MR(-40-10*i), 0, 0) * CN(-0.02*i, 0.4+0.05*i, -0.4-0.1*i)
  703. HWR.C0 = CN(0.1-0.1*i, 0, 0) * CA(MR(-325-35*i), 0, 0)
  704. HWL.C0 = CN(-0.1+0.1*i, 0, 0) * CA(MR(-325-35*i), 0, 0)
  705. FW.C0 = CN(0, -0.4-0.1*i, 0) * CA(MR(-6-4*i), 0, 0)
  706. FNeck.C0 = Neck0 * CA(MR(-4+16*i), 0, 0)
  707. wait()
  708. end
  709. RAW.C0 = CA(MR(-15), MR(20), MR(20))
  710. LAW.C0 = CA(MR(-15), MR(-20), MR(-20))
  711. RLW.C0 = CA(MR(15), 0, 0) * CN(0.02, 0.4, -0.75)
  712. LLW.C0 = CA(MR(-50), 0, 0) * CN(-0.02, 0.45, -0.5)
  713. HWR.C0 = CN()
  714. HWL.C0 = CN()
  715. FW.C0 = CN(0, -0.5, 0) * CA(MR(-10), 0, 0)
  716. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  717. end
  718.  
  719. function DeselAnim()
  720. for i = 0.25, 1, 0.25 do
  721. RAW.C0 = CA(MR(-15+4*i), MR(20-5*i), MR(20-3*i))
  722. LAW.C0 = CA(MR(-15+4*i), MR(-20+5*i), MR(-20+3*i))
  723. RLW.C0 = CA(MR(15-5*i), 0, 0) * CN(0.02-0.02*i, 0.4-0.1*i, -0.75+0.25*i)
  724. LLW.C0 = CA(MR(-50+15*i), 0, 0) * CN(-0.02+0.02*i, 0.45-0.1*i, -0.5+0.2*i)
  725. FW.C0 = CN(0, -0.5+0.15*i, 0) * CA(MR(-10+3*i), 0, 0)
  726. FNeck.C0 = Neck0 * CA(MR(20-15*i), 0, 0)
  727. wait()
  728. end
  729. for i = 0.2, 1, 0.2 do
  730. RAW.C0 = CA(MR(-11+11*i), MR(15-15*i), MR(17-17*i))
  731. LAW.C0 = CA(MR(-11+11*i), MR(-15+15*i), MR(-17+17*i))
  732. RLW.C0 = CA(MR(10-10*i), 0, 0) * CN(0, 0.3-0.3*i, -0.5+0.5*i)
  733. LLW.C0 = CA(MR(-35+35*i), 0, 0) * CN(0, 0.35-0.35*i, -0.3+0.3*i)
  734. FW.C0 = CN(0, -0.35+0.35*i, 0) * CA(MR(-7+7*i), 0, 0)
  735. FNeck.C0 = Neck0 * CA(MR(5-5*i), 0, 0)
  736. wait()
  737. end
  738. RAW.Part1 = nil
  739. LAW.Part1 = nil
  740. RLW.Part1 = nil
  741. LLW.Part1 = nil
  742. Attach(Torso)
  743. end
  744.  
  745. function onSelected(mouse)
  746. SelectAnim()
  747. Hum.WalkSpeed = Speed
  748. Selected = true
  749. mouse.Button1Down:connect(function()
  750. end)
  751. mouse.KeyDown:connect(function(key)
  752. key = key:lower()
  753. if Find(Attacks, key) then
  754. if key == "q" then
  755. Jump()
  756. end
  757. RAW.C0 = CA(MR(-15), MR(20), MR(20))
  758. LAW.C0 = CA(MR(-15), MR(-20), MR(-20))
  759. RLW.C0 = CA(MR(15), 0, 0) * CN(0.02, 0.4, -0.75)
  760. LLW.C0 = CA(MR(-50), 0, 0) * CN(-0.02, 0.45, -0.5)
  761. HWR.C0 = CN()
  762. HWL.C0 = CN()
  763. FW.C0 = CN(0, -0.5, 0) * CA(MR(-10), 0, 0)
  764. FNeck.C0 = Neck0 * CA(MR(20), 0, 0)
  765. end
  766. end)
  767. end
  768.  
  769. function onDeselected(mouse)
  770. Selected = false
  771. Hum.WalkSpeed = 16
  772. DeselAnim()
  773. end
  774.  
  775. bin.Selected:connect(onSelected)
  776. bin.Deselected:connect(onDeselected)
Add Comment
Please, Sign In to add comment