Advertisement
RazorShockk

Roblox Orange Blades Script

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