Advertisement
Stefanuk12

ROBLOX Script Builder Scripts ( Golden Blades )

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