GangHaning

Blue Knight (Roblox Script)

Aug 8th, 2016
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.71 KB | None | 0 0
  1. --Splintered sky Gifted by TheRedAngel, Local Script!
  2.  
  3. Me = game.Players.LocalPlayer
  4. Char = Me.Character
  5. Selected = false
  6. Attack = 1
  7. Attacking = false
  8. Hurt = false
  9. Deb = true
  10. Effect = false
  11. DMG = 35
  12. BlockAnim = false
  13. Rotation = 0
  14. RotationOn = false
  15.  
  16. CamStyles = {"Attach", "Custom", "Fixed", "Follow"}
  17. Where = 2
  18. Style = CamStyles[Where]
  19.  
  20. Asset = "http://www.roblox.com/asset/?id="
  21.  
  22. CA = CFrame.Angles
  23. CN = CFrame.new
  24. V3 = Vector3.new
  25. MR = math.rad
  26. MP = math.pi
  27. MRA = math.random
  28. MH = math.huge
  29.  
  30. Add = {
  31. Mesh = function(P, Id, Id2, scale)
  32. local m = Instance.new("SpecialMesh", P)
  33. m.Scale = scale
  34. m.MeshId = Id
  35. m.TextureId = Id2
  36. end
  37. }
  38.  
  39. Sounds = {
  40. Hit = {"http://www.roblox.com/asset/?id=10209590", 0.8, 1},
  41. Block = {"rbxasset://sounds\\metal.ogg", 1.3, 1},
  42. Slash = {"rbxasset://sounds\\swordslash.wav", 1.6, 1},
  43. }
  44.  
  45. Meshes = {
  46. Coif = {Asset..(52149739), Asset..(1090446)},
  47. Torso = {Asset..(52148801), Asset..(33308631)},
  48. Rarm = {Asset..(52148801), Asset..(33308774)},
  49. Larm = {Asset..(52148801), Asset..(33308496)},
  50. Rleg = {Asset..(52148801), Asset..(33308827)},
  51. Lleg = {Asset..(52148801), Asset..(33308564)},
  52. Sword = {Asset..(50798688), Asset..(50798664)},
  53. Shield = {Asset..(50798787), Asset..(50798797)},
  54. }
  55.  
  56. function waitChild(p, n)
  57. local child = p:findFirstChild(n)
  58. if child then return child end
  59. while true do
  60. child = p.ChildAdded:wait()
  61. if child.Name == n then return child end
  62. end
  63. end
  64.  
  65. function Part(P, Anch, Coll, Tran, Ref, Col, Size)
  66. local p = Instance.new("Part")
  67. p.TopSurface = 0
  68. p.BottomSurface = 0
  69. p.Transparency = Tran
  70. p.Reflectance = Ref
  71. p.CanCollide = Coll
  72. p.Anchored = Anch
  73. p.BrickColor = BrickColor.new(Col)
  74. p.formFactor = "Custom"
  75. p.Size = Size
  76. p.Parent = P
  77. p.Locked = true
  78. p:BreakJoints()
  79. return p
  80. end
  81.  
  82. function Weld(P0, P1, C0, C1)
  83. local w = Instance.new("Weld")
  84. w.Part0 = P0
  85. w.Part1 = P1
  86. w.C0 = C0
  87. w.C1 = C1
  88. w.Parent = P0
  89. return w
  90. end
  91.  
  92. for i,v in pairs(Char:children()) do
  93. if v.Name == "Icy" then v:remove() end
  94. end
  95.  
  96. Mod = Instance.new("Model")
  97. Mod.Name = "Icy"
  98.  
  99. Rarm = waitChild(Char, "Right Arm")
  100. Larm = waitChild(Char, "Left Arm")
  101. Rleg = waitChild(Char, "Right Leg")
  102. Lleg = waitChild(Char, "Left Leg")
  103. Torso = waitChild(Char, "Torso")
  104. Hum = waitChild(Char, "Humanoid")
  105. Neck = waitChild(Torso, "Neck")
  106.  
  107. RH = waitChild(Torso, "Right Hip")
  108. LH = waitChild(Torso, "Left Hip")
  109.  
  110. function Play(Sound)
  111. local s = Instance.new("Sound")
  112. s.SoundId = Sound[1]
  113. s.Pitch = Sound[2]
  114. s.Volume = Sound[3]
  115. s.PlayOnRemove = true
  116. s.Parent = Torso
  117. game.Debris:AddItem(s, 0.0001)
  118. end
  119.  
  120. for _,v in pairs(Char:children()) do
  121. if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Hat") or v:IsA("CharacterMesh") or v:IsA("BodyColors") then
  122. v:remove()
  123. elseif v:IsA("BoolValue") and v.Name == "Block" then
  124. v:remove()
  125. end
  126. end
  127.  
  128. for _,v in pairs(Torso:children()) do
  129. if v:IsA("Decal") or v:IsA("Texture") then v:remove() end
  130. end
  131.  
  132. CamBlock = Part(Mod, true, false, 1, 0, "White", V3(0.4, 0.4, 0.4))
  133. Cam = workspace.CurrentCamera
  134.  
  135. local Blocking = Instance.new("BoolValue")
  136. Blocking.Value = false
  137. Blocking.Name = "Block"
  138. Blocking.Parent = Char
  139.  
  140. Torso.Transparency = 1
  141.  
  142. Faketorso = Part(Mod, false, false, 0, 0, Torso.BrickColor.Name, V3(1.98, 1.98, 0.98))
  143. FW = Weld(Torso, Faketorso, CN(), CN())
  144.  
  145. Hat = Instance.new("Hat", Char)
  146. Hat.Name = "Epoc."
  147.  
  148. HatHandle = Part(Hat, false, false, 0, 0, "White", V3(1.5, 1.8, 1.4))
  149. HatHandle.Name = "Handle"
  150. Hat.AttachmentPos = V3(0, 0.3, -0.1)
  151. Add.Mesh(HatHandle, Meshes.Coif[2], Meshes.Coif[1], V3(1,0.8,0.9))
  152.  
  153. for _,v in pairs({{Rarm, Meshes.Rarm}, {Larm, Meshes.Larm}, {Rleg, Meshes.Rleg}, {Lleg, Meshes.Lleg}, {Faketorso, Meshes.Torso}}) do
  154. for _,v in pairs(v[1]:children()) do
  155. if v:IsA("SpecialMesh") then
  156. v:remove()
  157. end
  158. end
  159. local mes = Add.Mesh(v[1], v[2][2], v[2][1], V3(1,1,1))
  160. end
  161.  
  162. Sword = Part(Mod, false, false, 0, 0, "White", V3(0.8, 0.4, 4.5))
  163. Add.Mesh(Sword, Meshes.Sword[2], Meshes.Sword[1], V3(2.1, 2.5, 2.15))
  164.  
  165. Shield = Part(Mod, false, false, 0, 0, "White", V3(2.3, 0.6, 3))
  166. Add.Mesh(Shield, Meshes.Shield[2], Meshes.Shield[1], V3(1.7, 1.9, 1.8))
  167.  
  168. RABrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  169. LABrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  170. RLBrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  171. LLBrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  172.  
  173. RABW = Weld(Torso, RABrick, CN(), CN(-1.5, -0.5, 0))
  174. LABW = Weld(Torso, LABrick, CN(), CN(1.5, -0.5, 0))
  175. RLBW = Weld(Torso, RLBrick, CN(), CN(-0.5, 1.2, 0))
  176. LLBW = Weld(Torso, LLBrick, CN(), CN(0.5, 1.2, 0))
  177.  
  178. function Atch(p)
  179. RABW.Part0 = p
  180. LABW.Part0 = p
  181. RLBW.Part0 = p
  182. LLBW.Part0 = p
  183. RH.Part0 = p
  184. LH.Part0 = p
  185. end
  186.  
  187. RAW = Weld(RABrick, nil, CN(), CN(0, 0.5, 0))
  188. LAW = Weld(LABrick, nil, CN(), CN(0, 0.5, 0))
  189. RLW = Weld(RLBrick, nil, CN(), CN(0, 0.8, 0))
  190. LLW = Weld(LLBrick, nil, CN(), CN(0, 0.8, 0))
  191.  
  192. HB = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  193. HBW = Weld(Rarm, HB, CN(0, -1, 0), CN())
  194. HW = Weld(HB, nil, CN(), CN(0, 0, -2) * CA(MP, 0, MR(90)))
  195.  
  196. SW = Weld(Larm, Shield, CA(MR(-90), 0, MR(90)), CN(0, -0.2, 0.4) * CA(MR(-20), 0, 0))
  197. TW = Weld(Torso, Sword, CA(MR(90), MR(-40), 0), CN(0, -0.7, 0))
  198.  
  199. function Normal()
  200. SW.C1 = CN(0, -0.2, 0.4) * CA(MR(-20), 0, 0)
  201. HW.C0 = CN()
  202. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(70), MR(40), MR(-30))
  203. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(45), MR(-35), MR(20))
  204. HW.C1 = CN(0, 0, -2) * CA(MP, 0, MR(-90))
  205. FW.C0 = CN()
  206. end
  207.  
  208. Mod.Parent = Char
  209.  
  210. if script.Parent.className ~= "HopperBin" then
  211. h = Instance.new("HopperBin",Me.Backpack)
  212. h.Name = "Splintered sky"
  213. script.Parent = h
  214. end
  215.  
  216. Bin = script.Parent
  217.  
  218. function getStat(c)
  219. local blo = false
  220. local h
  221. for _,v in pairs(c:children()) do
  222. if v:IsA("Humanoid") then
  223. if v.Health > 0 then
  224. h = v
  225. end
  226. elseif v:IsA("BoolValue") then
  227. if v.Name == "Block" then
  228. blo = v.Value
  229. end
  230. end
  231. end
  232. return h, blo
  233. end
  234.  
  235. function Damage(h, dmg)
  236. h.Health = h.Health - dmg
  237. end
  238.  
  239. function SwordDmg(hit)
  240. local h, b = getStat(hit.Parent)
  241. if h then
  242. if Hurt and Deb and b == false then
  243. Damage(h, MRA(5+(DMG/3), DMG+5))
  244. Play(Sounds.Hit)
  245. elseif Hurt and Deb and b then
  246. Play(Sounds.Block)
  247. end
  248. Deb = false
  249. end
  250. end
  251.  
  252. Sword.Touched:connect(SwordDmg)
  253.  
  254. function SE(part, cf)
  255. coroutine.resume(coroutine.create(function()
  256. Effect = true
  257. local lastP = (part.CFrame * cf).p
  258. while Effect do
  259. wait()
  260. local p = Part(Mod, true, false, 0, 0, "White", V3(0.2, 0.2, 0.2))
  261. local posnow = (part.CFrame * cf).p
  262. local magn = (lastP - posnow).magnitude
  263. local cc = CN(lastP, posnow) * CA(MR(-90), 0, 0) * CN(0, magn/2, 0)
  264. local m = Instance.new("SpecialMesh", p)
  265. m.MeshType = "Head"
  266. m.Scale = V3(0.9, magn*5+0.45, 0.9)
  267. p.CFrame = cc
  268. coroutine.resume(coroutine.create(function()
  269. for i = 0, 1, 0.15 do
  270. wait()
  271. m.Scale = V3(0.9-0.9*i, magn*5+0.45-0.45*i, 0.9-0.9*i)
  272. p.Transparency = -0.2+1.2*i
  273. end
  274. p:remove()
  275. end))
  276. lastP = (part.CFrame * cf).p
  277. end
  278. end))
  279. end
  280.  
  281. function EE()
  282. Effect = false
  283. end
  284.  
  285. function SetAtk(S, E)
  286. coroutine.resume(coroutine.create(function()
  287. Attack = E
  288. wait(0.25)
  289. Attack = S
  290. end))
  291. end
  292.  
  293. Combo = {
  294. function()
  295. Attack = 1
  296. Atch(Faketorso)
  297. Attacking = true
  298. for i = 0.15, 1, 0.15 do
  299. FW.C0 = CA(0, MR(-35*i), 0)
  300. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(70+90*i), MR(40-20*i), MR(-30+30*i))
  301. HW.C0 = CA(MR(20*i), 0, MR(-10*i))
  302. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(45+10*i), MR(-35+20*i), MR(20))
  303. wait()
  304. end
  305. Play(Sounds.Slash)
  306. for i = 0.33, 1, 0.33 do
  307. FW.C0 = CA(0, MR(-35-10*i), 0)
  308. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(160+10*i), MR(20-5*i), MR(10*i))
  309. HW.C0 = CA(MR(20+5*i), 0, MR(-10))
  310. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(55+5*i), MR(-15+5*i), MR(20))
  311. wait()
  312. end
  313. SE(Sword, CN(0, 0, 2.2))
  314. Hurt = true
  315. Deb = true
  316. for i = 0.16, 1, 0.16 do
  317. FW.C0 = CA(0, MR(-45+60*i), 0)
  318. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(170-140*i), MR(15+10*i), MR(10-20*i))
  319. HW.C0 = CA(MR(25-75*i), 0, MR(-10))
  320. LAW.C0 = CN(0.3, 0, -0.5+0.8*i) * CA(MR(60-90*i), MR(-10+20*i), MR(20-30*i))
  321. wait()
  322. end
  323. Hurt = false
  324. for i = 0.25, 1, 0.25 do
  325. FW.C0 = CA(0, MR(15+10*i), 0)
  326. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(30-10*i), MR(25+5*i), MR(-10-5*i))
  327. HW.C0 = CA(MR(-50-5*i), 0, MR(-10))
  328. LAW.C0 = CN(0.3, 0, 0.3+0.1*i) * CA(MR(-30-10*i), MR(10+5*i), MR(-10-5*i))
  329. wait()
  330. end
  331. EE()
  332. SetAtk(1, 2)
  333. Attacking = false
  334. wait(0.08)
  335. for i = 0.2, 1, 0.2 do
  336. if Attacking then return end
  337. FW.C0 = CA(0, MR(25-25*i), 0)
  338. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(20+40*i), MR(30+8*i), MR(-15-10*i))
  339. HW.C0 = CA(MR(-55+45*i), 0, MR(-10+10*i))
  340. LAW.C0 = CN(0.3, 0, 0.4-0.8*i) * CA(MR(-40+75*i), MR(15-45*i), MR(-15+30*i))
  341. wait()
  342. end
  343. for i = 0.33, 1, 0.33 do
  344. if Attacking then return end
  345. FW.C0 = CA(0, 0, 0)
  346. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(60+10*i), MR(38+2*i), MR(-25-5*i))
  347. HW.C0 = CA(MR(-10+10*i), 0, 0)
  348. LAW.C0 = CN(0.3, 0, -0.4-0.1*i) * CA(MR(35+10*i), MR(-30-5*i), MR(15+5*i))
  349. wait()
  350. end
  351. Attack = 1
  352. Attacking = false
  353. FW.C0 = CN()
  354. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(70), MR(40), MR(-30))
  355. HW.C0 = CN()
  356. Atch(Torso)
  357. end,
  358. function()
  359. Attack = 2
  360. Attacking = true
  361. for i = 0.1, 1, 0.1 do
  362. FW.C0 = CA(0, MR(25+15*i), 0)
  363. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(20+65*i), MR(30-30*i), MR(-15-35*i))
  364. LAW.C0 = CN(0.3+0.3*i, 0, 0.2) * CA(MR(-40-10*i), MR(15), MR(-15))
  365. HW.C0 = CA(MR(-55+45*i), MR(80*i), MR(-10+10*i))
  366. wait()
  367. end
  368. Play(Sounds.Slash)
  369. for i = 0.25, 1, 0.25 do
  370. FW.C0 = CA(0, MR(40+5*i), 0)
  371. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(85+5*i), 0, MR(-50-5*i))
  372. LAW.C0 = CN(0.6, 0, 0.2) * CA(MR(-50-5*i), MR(15), MR(-15))
  373. HW.C0 = CA(MR(-10+10*i), MR(80+10*i), 0)
  374. wait()
  375. end
  376. SE(Sword, CN(0, 0, 2.2))
  377. Hurt = true
  378. Deb = true
  379. for i = 0.16, 1, 0.16 do
  380. FW.C0 = CA(0, MR(45-80*i), 0)
  381. RAW.C0 = CN(-0.3+0.3*i, 0.2, -0.4) * CA(MR(90), 0, MR(-55+95*i))
  382. LAW.C0 = CN(0.6-0.3*i, 0, 0.2-0.8*i) * CA(MR(-55+130*i), MR(15-15*i), MR(-15+50*i))
  383. HW.C0 = CA(0, MR(90), 0)
  384. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-40*i), MR(-90))
  385. wait()
  386. end
  387. Hurt = false
  388. for i = 0.25, 1, 0.25 do
  389. FW.C0 = CA(0, MR(-35-10*i), 0)
  390. RAW.C0 = CN(0.1*i, 0.2, -0.4) * CA(MR(90), 0, MR(40+10*i))
  391. LAW.C0 = CN(0.3, 0, -0.6+0.1*i) * CA(MR(75+10*i), 0, MR(35+10*i))
  392. HW.C0 = CA(0, MR(90), 0)
  393. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-40-5*i), MR(-90))
  394. wait()
  395. end
  396. EE()
  397. SetAtk(1, 3)
  398. Attacking = false
  399. wait(0.08)
  400. for i = 0.16, 1, 0.16 do
  401. if Attacking then return end
  402. FW.C0 = CA(0, MR(-45+35*i), 0)
  403. RAW.C0 = CN(0.1-0.4*i, 0.2, -0.4) * CA(MR(90-15*i), MR(35*i), MR(50-70*i))
  404. LAW.C0 = CN(0.3, 0, -0.6+0.1*i) * CA(MR(85-30*i), MR(-30*i), MR(45-20*i))
  405. HW.C0 = CA(0, MR(90-80*i), 0)
  406. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-45+40*i), MR(-90))
  407. wait()
  408. end
  409. for i = 0.25, 1, 0.25 do
  410. if Attacking then return end
  411. FW.C0 = CA(0, MR(-10+10*i), 0)
  412. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(75-5*i), MR(35+5*i), MR(-20-10*i))
  413. LAW.C0 = CN(0.3, 0, -0.6+0.1*i) * CA(MR(55-10*i), MR(-30-5*i), MR(25-5*i))
  414. HW.C0 = CA(0, MR(10-10*i), 0)
  415. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-5+5*i), MR(-90))
  416. wait()
  417. end
  418. Normal()
  419. Atch(Torso)
  420. end,
  421. function()
  422. Attack = 3
  423. Attacking = true
  424. for i = 0.15, 1, 0.15 do
  425. FW.C0 = CA(0, MR(-45+35*i), 0)
  426. RAW.C0 = CN(0.1-0.2*i, 0.2-0.2*i, -0.4) * CA(MR(90+30*i), 0, MR(50-70*i)) * CN(0, -0.5*i, 0)
  427. LAW.C0 = CN(0.3-0.2*i, 0, -0.5) * CA(MR(85+35*i), 0, MR(45-25*i)) * CN(0, -0.5*i, 0)
  428. HW.C0 = CA(0, MR(90-70*i), MR(-45*i))
  429. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-45+45*i), MR(-90))
  430. wait()
  431. end
  432. for i = 0.18, 1, 0.18 do
  433. FW.C0 = CA(0, MR(-10+10*i), 0)
  434. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(120+80*i), 0, MR(-20-15*i)) * CN(0, -0.5-0.1*i, 0)
  435. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(120+80*i), 0, MR(20+15*i)) * CN(0, -0.5-0.1*i, 0)
  436. HW.C0 = CA(0, MR(20-20*i), MR(-45-10*i))
  437. HW.C1 = CN(0, 0, -2) * CA(MP, 0, MR(-90))
  438. wait()
  439. end
  440. Play(Sounds.Slash)
  441. for i = 0.25, 1, 0.25 do
  442. FW.C0 = CA(0, 0, 0)
  443. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(200+10*i), 0, MR(-35-5*i)) * CN(0, -0.6, 0)
  444. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(200+10*i), 0, MR(35+5*i)) * CN(0, -0.6, 0)
  445. HW.C0 = CA(0, 0, MR(-55+5*i))
  446. wait()
  447. end
  448. SE(Sword, CN(0, 0, 2.2))
  449. Hurt = true
  450. Deb = true
  451. for i = 0.14, 1, 0.14 do
  452. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(210-180*i), 0, MR(-40)) * CN(0, -0.6-0.25*i, 0)
  453. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(210-180*i), 0, MR(40)) * CN(0, -0.6-0.25*i, 0)
  454. HW.C0 = CA(MR(-55*i), MR(-30*i), MR(-50))
  455. wait()
  456. end
  457. Hurt = false
  458. EE()
  459. Play(Sounds.Block)
  460. for i = 0.33, 1, 0.33 do
  461. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(30+5*i), 0, MR(-40)) * CN(0, -0.85+0.4*i, 0)
  462. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(30+5*i), 0, MR(40)) * CN(0, -0.85+0.4*i, 0)
  463. HW.C0 = CA(MR(-55+5*i), MR(-30), MR(-50))
  464. wait()
  465. end
  466. for i = 0.16, 1, 0.16 do
  467. RAW.C0 = CN(-0.1-0.2*i, 0, -0.4) * CA(MR(35+25*i), MR(30*i), MR(-40+7*i)) * CN(0, -0.45+0.3*i, 0)
  468. LAW.C0 = CN(0.1+0.2*i, 0, -0.5) * CA(MR(35+5*i), MR(-30*i), MR(40-15*i)) * CN(0, -0.45+0.3*i, 0)
  469. HW.C0 = CA(MR(-50+40*i), MR(-30+25*i), MR(-50+45*i))
  470. wait()
  471. end
  472. for i = 0.25, 1, 0.25 do
  473. RAW.C0 = CN(-0.3, 0, -0.4) * CA(MR(60+10*i), MR(30+10*i), MR(-33+3*i)) * CN(0, -0.15+0.15*i, 0)
  474. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(40+5*i), MR(-30+5*i), MR(25-5*i)) * CN(0, -0.15+0.15*i, 0)
  475. HW.C0 = CA(MR(-10+10*i), MR(-5+5*i), MR(-5+5*i))
  476. wait()
  477. end
  478. Attack = 1
  479. Atch(Torso)
  480. Attacking = false
  481. Normal()
  482. end
  483. }
  484.  
  485. function onButtonDown()
  486. if Attacking == false and BlockAnim == false and Blocking.Value == false then
  487. Combo[Attack]()
  488. end
  489. end
  490.  
  491. function Block()
  492. coroutine.resume(coroutine.create(function()
  493. Blocking.Value = true
  494. BlockAnim = true
  495. for i = 0.15, 1, 0.15 do
  496. LAW.C0 = CN(0.3+0.4*i, 0, -0.5-0.4*i) * CA(MR(45+35*i), MR(-35+30*i), MR(20+50*i))
  497. RAW.C0 = CN(-0.3-0.1*i, 0.2, -0.4) * CA(MR(70+15*i), MR(40-30*i), MR(-30-30*i))
  498. SW.C1 = CN(0, -0.2, 0.4) * CA(MR(-20+15*i), MR(-75*i), 0)
  499. wait()
  500. end
  501. Play(Sounds.Block)
  502. for i = 0.33, 1, 0.33 do
  503. LAW.C0 = CN(0.7+0.1*i, 0, -0.9-0.1*i) * CA(MR(80+5*i), MR(-5+5*i), MR(70+10*i))
  504. RAW.C0 = CN(-0.4, 0.2, -0.4) * CA(MR(85+5*i), MR(10-10*i), MR(-60-5*i))
  505. SW.C1 = CN(0, -0.2, 0.4) * CA(MR(-5+5*i), MR(-75-15*i), 0)
  506. wait()
  507. end
  508. LAW.C0 = CN(0.8, 0, -1) * CA(MR(85), 0, MR(80))
  509. repeat wait() until Blocking.Value == false
  510. for i = 0.14, 1, 0.14 do
  511. LAW.C0 = CN(0.8-0.5*i, 0, -1+0.5*i) * CA(MR(85-40*i), MR(-35*i), MR(80-60*i))
  512. RAW.C0 = CN(-0.4+0.1*i, 0.2, -0.4) * CA(MR(90-20*i), MR(40*i), MR(-65+35*i))
  513. SW.C1 = CN(0, -0.2, 0.4) * CA(MR(-20*i), MR(-90+90*i), 0)
  514. wait()
  515. end
  516. BlockAnim = false
  517. Normal()
  518. end))
  519. end
  520.  
  521. function SelectAnim()
  522. RAW.Part1 = Rarm
  523. for i = 0.14, 1, 0.14 do
  524. RAW.C0 = CA(MR(205*i), MR(30*i), MR(-10*i))
  525. wait()
  526. end
  527. for i = 0.33, 1, 0.33 do
  528. RAW.C0 = CA(MR(205+15*i), MR(30), MR(-10))
  529. wait()
  530. end
  531. HW.C0 = CA(MR(40), MR(30), MR(120))* CN(0, 0, 0.15)
  532. HW.Part1 = Sword
  533. TW.Part1 = nil
  534. for i = 0.18, 1, 0.18 do
  535. RAW.C0 = CA(MR(220-80*i), MR(30-50*i), MR(-10+30*i))
  536. HW.C0 = CA(MR(40-40*i), MR(30-30*i), MR(120-120*i))* CN(0, 0, 0.15-0.15*i)
  537. wait()
  538. end
  539. for i = 0.33, 1, 0.33 do
  540. RAW.C0 = CA(MR(140-15*i), MR(-20-5*i), MR(20+5*i))
  541. HW.C0 = CA(MR(-10*i), 0, 0)
  542. wait()
  543. end
  544. LAW.Part1 = Larm
  545. for i = 0.18, 1, 0.18 do
  546. RAW.C0 = CN(-0.3*i, 0.2*i, -0.4*i) * CA(MR(125-45*i), MR(-25+60*i), MR(25-50*i))
  547. LAW.C0 = CN(0.3*i, 0, -0.5*i) * CA(MR(40*i), MR(-30*i), MR(15*i))
  548. HW.C0 = CA(MR(-10+10*i), 0, 0)
  549. wait()
  550. end
  551. HW.C0 = CN()
  552. for i = 0.33, 1, 0.33 do
  553. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(80-10*i), MR(35+5*i), MR(-25-5*i))
  554. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(40+5*i), MR(-30-5*i), MR(15+5*i))
  555. wait()
  556. end
  557. Normal()
  558. end
  559.  
  560. function DeselectAnim()
  561. for i = 0.14, 1, 0.14 do
  562. RAW.C0 = CN(-0.3+0.3*i, 0.2-0.2*i, -0.4+0.4*i) * CA(MR(70+80*i), MR(40-60*i), MR(-30+20*i))
  563. LAW.C0 = CN(0.3-0.3*i, 0, -0.5+0.5*i) * CA(MR(45-35*i), MR(-35+25*i), MR(20-15*i))
  564. wait()
  565. end
  566. for i = 0.33, 1, 0.33 do
  567. RAW.C0 = CA(MR(150+10*i), MR(-20-5*i), MR(-10+5*i))
  568. LAW.C0 = CA(MR(10-10*i), MR(-10+10*i), MR(5-5*i))
  569. wait()
  570. end
  571. LAW.Part1 = nil
  572. for i = 0.18, 1, 0.18 do
  573. RAW.C0 = CA(MR(160+50*i), MR(-25+50*i), MR(-5-5*i))
  574. HW.C0 = CA(MR(30*i), MR(25*i), MR(110*i))* CN(0, 0, 0.15*i)
  575. wait()
  576. end
  577. for i = 0.33, 1, 0.33 do
  578. RAW.C0 = CA(MR(210+10*i), MR(25+5*i), MR(-10))
  579. HW.C0 = CA(MR(30+10*i), MR(25+5*i), MR(110+10*i))* CN(0, 0, 0.15)
  580. wait()
  581. end
  582. HW.Part1 = nil
  583. TW.Part1 = Sword
  584. for i = 0.2, 1, 0.2 do
  585. RAW.C0 = CA(MR(220-200*i), MR(30-20*i), MR(-10+10*i))
  586. wait()
  587. end
  588. for i = 0.33, 1, 0.33 do
  589. RAW.C0 = CA(MR(20-20*i), MR(10-10*i), 0)
  590. wait()
  591. end
  592. RAW.Part1 = nil
  593. end
  594.  
  595. function onSelected(mouse)
  596. SelectAnim()
  597. Selected = true
  598. mouse.KeyDown:connect(function(key)
  599. key = key:lower()
  600. if key == "f" and Blocking.Value == false and BlockAnim == false and Attacking == false then
  601. Block()
  602. local k
  603. repeat k = mouse.KeyUp:wait() until k == "f"
  604. Blocking.Value = false
  605. elseif key == "q" then
  606. Where = Where - 1
  607. elseif key == "e" then
  608. Where = Where + 1
  609. elseif key == "z" then
  610. local h = nil
  611. local t = mouse.Target
  612. if t then
  613. h = getStat(t.Parent)
  614. if h == nil and t.Parent.Parent ~= game and t.Parent.Parent ~= nil then
  615. h = getStat(t.Parent.Parent)
  616. end
  617. end
  618. if h == nil then
  619. CamBlock.CFrame = CFrame.new(mouse.Hit.p)
  620. Cam.CameraSubject = CamBlock
  621. Cam.CameraType = Enum.CameraType[ CamStyles[ Where ] ]
  622. else
  623. Cam.CameraSubject = h
  624. end
  625. elseif key == "x" then
  626. Cam.CameraSubject = Hum
  627. elseif key == "r" then
  628. RotationOn = not RotationOn
  629. elseif key == "t" then
  630. local k
  631. coroutine.resume(coroutine.create(function()
  632. repeat
  633. wait()
  634. Rotation = Rotation - 0.05
  635. until k == "t"
  636. end))
  637. repeat k = mouse.KeyUp:wait() until k == "t"
  638. elseif key == "y" then
  639. local k
  640. coroutine.resume(coroutine.create(function()
  641. repeat
  642. wait()
  643. Rotation = Rotation + 0.05
  644. until k == "y"
  645. end))
  646. repeat k = mouse.KeyUp:wait() until k == "y"
  647. end
  648. if Where > #CamStyles then Where = 1 elseif Where < 1 then Where = #CamStyles end
  649. Cam.CameraType = Enum.CameraType[CamStyles[Where] ]
  650. end)
  651. mouse.Button1Down:connect(function()
  652. onButtonDown()
  653. end)
  654. end
  655.  
  656. function onDeselected(mouse)
  657. Selected = false
  658. DeselectAnim()
  659. end
  660.  
  661. Bin.Selected:connect(onSelected)
  662. Bin.Deselected:connect(onDeselected)
  663.  
  664. while true do
  665. wait()
  666. if RotationOn then
  667. Cam.CoordinateFrame = Cam.CoordinateFrame * CN(Rotation, 0, 0)
  668. end
  669. end
Add Comment
Please, Sign In to add comment