Advertisement
IHackShootingGames

Splinterd sky

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