Advertisement
SmokeDelsin

attacks

Jul 24th, 2015
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local ply = game.Players.LocalPlayer
  2. char = ply.Character
  3. torso = char.Torso
  4. head = char.Head
  5. holding = false
  6. RS = game:service'RunService'
  7. larm,rarm = char['Left Arm'],char['Right Arm']
  8. Debris = game:service'Debris'
  9. floatforce = 196.25
  10. attacking = false
  11. lh,rh = torso['Left Hip'],torso['Right Hip']
  12. curcam = Workspace.CurrentCamera
  13. mouse = ply:GetMouse()
  14. FFS = function(A,B) return A:FindFirstChild(B) end ---- FindFirstChild Shortcut
  15. function genNew(ClassName, Parent, Properties)
  16. local nObj = Instance.new(ClassName, Parent)
  17. if Properties["FormFactor"] then
  18. nObj["FormFactor"] = Properties["FormFactor"]
  19. end
  20. for Prop, Value in pairs(Properties) do
  21. nObj[Prop] = Value
  22. end
  23. return nObj
  24. end
  25. pcall(function() char.Sole:Destroy() end) --- Destroys Physical Tool
  26. Weapon = Instance.new("Model",char) Weapon.Name = 'Sole'
  27. cfn,ang,md,mr = CFrame.new,CFrame.Angles,math.rad,math.random --- Some Shortcuts
  28. udim = function(a,b)
  29. if type(a) ~= 'string' then
  30. return UDim2.new(a,0,b,0)
  31. else
  32. local x,y = a:match('(%.*%d+)%,(%.*%d+)')
  33. return UDim2.new(x,0,y,0)
  34. end
  35. end
  36. for i,v in pairs(head:children()) do
  37. if v.Name == 'MugSound' then v:Destroy() end
  38. end
  39. Name = 'Seokinji'
  40. pcall(function() ply.Backpack[Name]:Destroy() end) --- Destroys Tool
  41. hop = Instance.new('HopperBin',ply.Backpack)
  42. hop.Name = Name
  43. rw,lw = _,_
  44. Col3 = function(r,g,b) return Color3.new(r/255,g/255,b/255) end
  45. udim = function(x,y) return UDim2.new(x,0,y,0) end
  46. bcol = BrickColor.new
  47. ---TOOLS---
  48. Add ={ --- Array for handy functions
  49.  
  50. --Attacks
  51. nsize = tip.Size
  52. Mons = Add.Sound("http://www.roblox.com/Asset/?id=2676305",2)
  53. function slash()
  54. hurt = false
  55. local con = tip.Touched:connect(function(hit)
  56. local hum = FindHum(hit.Parent)
  57. if hum and hurt and hum.Health > 0 then
  58. hum.Health = hum.Health -(3)
  59. elseif hum and hum.Health <= 0 and not FFS(hum,'Dead') then hum.Health = -1
  60. Mons:Play() Instance.new('BoolValue',hum).Name = 'Dead'
  61. for i,v in pairs(hum.Parent:children()) do
  62. if v:IsA('Part') then
  63. Instance.new('BodyForce',v).force = Vector3.new(0,v:GetMass()*floatforce,0)
  64. end end
  65. end
  66. end)
  67. function stab() Lock'L'
  68. bp = Add.BP(torso,l(torso,0,5,-5).p)
  69. tw(rw,cfn(0,.7,0)*ang(md(-140),md(-45),md(20)),.1,'') --up
  70. tw(lw,cfn(0,.7,0)*ang(md(-140),md(45),md(20))) wait(3)
  71. end
  72. local function second()
  73. tw(rw,cfn(-.2,.3,.2)*ang(md(-130),md(-45),md(-10)),.1,'') --Rise
  74. for i = 0,1,.1 do wait() --Morph
  75. lerp(nsize,Vector3.new(.5,4,.5),i)
  76. tipw.Parent = ydin
  77. tipw.Part1 = tip tipw.Part0 = ydin
  78. tipw.C0 = cfn(0,.6+i*1.5,0)
  79. end
  80. Synth:Pitch(2) Synth:Play()
  81. tw(rw,cfn()*ang(md(40),md(0),md(-50)),.3) --Down
  82. hurt = true
  83. end
  84. tw(rw,cfn(-.2,.3,.2)*ang(md(-130),md(-45),md(-50)),.1,'') --Rise
  85. for i = 0,1,.1 do wait() --Morph
  86. tip.Size = lerp(nsize,Vector3.new(.5,4,.5),i)
  87. tipw.Parent = ydin
  88. tipw.Part1 = tip tipw.Part0 = ydin
  89. tipw.C0 = cfn(0,.6+i*1.5,0)
  90. end Synth:Play()
  91. downed = check('f') hurt = true
  92. tw(rw,cfn()*ang(md(40),md(0),md(-10)),.3) --Down
  93. CreateLoop(1,{f=second;q=stab})
  94. hurt = false
  95. tw(rw,equip,.1,'') --Back
  96. for i = 1,0,-.3 do wait() --Morph back
  97. tip.Size = lerp(nsize,Vector3.new(.5,4,.5),i)
  98. tipw.Parent = ydin
  99. tipw.Part1 = tip tipw.Part0 = ydin
  100. tipw.C0 = cfn(0,.6+i*1.5,0)
  101. end
  102. Synth:Pitch(1) con:disconnect()
  103. end
  104. Whoosh = Add.Sound("http://www.roblox.com/Asset/?id=18426149",1)
  105. function trip()
  106. Lock2'R'
  107. local con = char['Right Leg'].Touched:connect(function(hit)
  108. local hum = FindHum(hit.Parent)
  109. hum.Health = hum.Health - 5
  110. if hum then hum.Sit = true end
  111. end)
  112. tw(rw2,cfn(0,-.2,-.3)*ang(md(30),0,0)) Whoosh:Play()
  113. tw(rw2,cfn(0,.5,.3)*ang(md(-70),0,0),.3)
  114. tw(rw2,cfn(),.3)
  115. Lock2'R'
  116. con:disconnect()
  117. end
  118. function sit()
  119. if sitbp == nil then
  120. Lock2'R' Lock2'L' Lock'L'
  121. sitbp = Add.BP(torso,torso.Position)
  122. sitbg = Add.BG(torso)
  123. --rw2.C1 = cfn()*ang(md(i),0,md(i/(90/-30)))
  124. --lw2.C1 = cfn()*ang(md(i),0,md(i/(90/30)))
  125. tw(rw2,cfn(.15,.4,.3)*ang(md(-60),md(30),0),.1,'') --right leg
  126. tw(lw2,cfn(-.15,.4,.3)*ang(md(-60),md(-30),0),.1,'') --left leg
  127. tw(rw,cfn()*ang(md(25),0,md(-20)),.1,'') --rarm down
  128. tw(lw,cfn()*ang(md(25),0,md(20)),.1,'') --larm down
  129. cf = torso.CFrame
  130. for i = 0,1,.1 do wait()
  131. sitbp.position = torso.Position - Vector3.new(0,i*1.25,0)
  132. sitbg.cframe = cf*ang(md(i*20),0,0)
  133. end
  134. elseif sitbp ~= nil then
  135. --rw2.C1 = cfn()*ang(md(i),0,md(i/(90/-30)))
  136. --lw2.C1 = cfn()*ang(md(i),0,md(i/(90/30)))
  137. tw(rw2,cfn(),.1,'')
  138. tw(lw2,cfn(),.1,'') tw(rw,equip,.1,'')
  139. for i = 0,1,.1 do wait()
  140. sitbp.position = torso.Position + Vector3.new(0,i,0)
  141. sitbg.cframe = cf*cfn(-i,-i,-i)
  142. end
  143. Lock2'R' Lock2'L' Lock'L'
  144. sitbp:Remove() sitbg:Destroy() sitbp = nil sitbg = _
  145. end
  146. end
  147. Crack = Add.Sound("http://www.roblox.com/Asset/?id=15933756",1)
  148. Crack.Sound.Volume = 300
  149. function blast() local list = {}
  150. tw(rw,cfn()*ang(md(-120),0,0),.1,'')
  151. tw(hw,cfn()*ang(md(45),0,0))
  152. met = Part(1,1,1,'White',0,1,1)
  153. holding = true
  154. mag = 1 maxmag = 15
  155. while holding do mag = mag < maxmag and mag+.5 or maxmag
  156. met.Size = Vector3.new(1,mag*7,1)
  157. met.CFrame = l(l(torso,0,0,-7),0,0,-mag*7/2,math.pi/2)
  158. wait()
  159. end
  160. met:Destroy()
  161. tcf = torso.CFrame
  162. for y = 0,mag do
  163. local ground = GetGround(l(tcf,0,0,-7-y*7).p,300)
  164. if ground.pos then
  165. cf = cfn(ground.pos)
  166. end
  167. for i = 1,15 do local tab = {}
  168. p = Part(1,1,1,i%2 == 0 and 'White' or 'Cyan',0,1,1)
  169. p.CFrame = l(cf,mr(-5,5),0,mr(-5,5))
  170. tab.obj = p
  171. tab.cf = p.CFrame
  172. tab.size = mr(5,10)
  173. table.insert(list,tab)
  174. end
  175. end Crack:Play()
  176. for i = 0,1,.2 do wait()
  177. for _,v in pairs(list) do
  178. v.obj.Size = Vector3.new(1,v.size*i,1)
  179. v.obj.CFrame = v.cf*cfn(0,v.size*i/2,0)
  180. end
  181. end
  182. Delay(4,function()
  183. for i = 1,0,-.2 do wait()
  184. for _,v in pairs(list) do
  185. v.obj.Size = Vector3.new(1,v.size*i,1)
  186. v.obj.CFrame = v.cf*cfn(0,v.size*i/2,0)
  187. end
  188. end
  189. for _,v in pairs(list) do
  190. v.obj:Destroy()
  191. end end)
  192. tw(rw,equip,.1,'') tw(hw,cfn())
  193. end
  194. Cages = {}
  195. function shoudon(mouse) a = 0
  196. Mod = Instance.new('Model',Weapon)
  197. Cur_Parent = Mod
  198. p = Part(1,1,1,'Black',1) p.Anchored = true
  199. holding = true
  200. genNew('SelectionBox',p,{
  201. Adornee = p;
  202. Color = bcol'Cyan';
  203. })
  204. cf = mouse.hit
  205. while holding do wait() a = a+1
  206. if Keys.e then for i,v in pairs(Cages) do v:Destroy() end p:Destroy() Cages = {}
  207. return end
  208. p.Size = Vector3.new(a,a,a)
  209. p.CFrame = cfn(cf.p)*cfn(0,a/2,0)
  210. end
  211.  
  212. for i = 1,0,-.1 do
  213. wait()
  214. p.Transparency = i
  215. end
  216. for _,y in pairs({-a/2+.5,a/2+.5}) do
  217. for _,pos in pairs({ {x=a/2,z=0};{x=-a/2,z=0};{z=a/2,x=0,r=1};{z=-a/2,x=0,r=1} }) do
  218. w = Part(1,1,a+1,'Black',0,1,1)
  219. w.CFrame = l(p,pos.x,y,pos.z,0,pos.r and math.pi/2 or 0)
  220. w = Part(1,a-1,a-1,'Cyan',.5,1,1)
  221. w.CFrame = l(p,pos.x,.5,pos.z,0,pos.r and math.pi/2 or 0)
  222. end
  223. end
  224. w = Part(1,a-1,a-1,'Cyan',.5,1,1)
  225. w.CFrame = l(p,0,a/2,0,0,0,math.pi/2)
  226. w = Part(1,a-1,a-1,'Cyan',.5,1,1)
  227. w.CFrame = l(p,0,-a/2,0,0,0,math.pi/2)
  228. for i,pos in pairs({ {x=a/2,z=a/2};{x=-a/2,z=-a/2};{z=a/2,x=-a/2};{z=-a/2,x= a/2} }) do
  229. w = Part(1,a,1,'Black',0,1,1)
  230. w.CFrame = l(p,pos.x,0,pos.z,0)
  231. end
  232. table.insert(Cages,Mod) Cur_Parent = _
  233. for i = 0,1,.1 do
  234. wait()
  235. p.Transparency = i
  236. end
  237. p:Destroy()
  238. end
  239. for i,v in pairs(torso:children()) do if v:IsA'BodyGyro' or v:IsA'BodyPosition' or v:IsA'BodyVelocity' then v:Destroy() end end
  240. function teleport(mouse) char.archivable = true
  241. coroutine.wrap(function() loopi = true a = 0
  242. repeat a = a+1
  243. local p = Part(5,5,5,a%2 == 0 and 'White' or 'Cyan',.5)
  244. p.CFrame = l(torso,0,0,0,mr(-10,10),mr(-10,10),mr(-10,10))
  245. Debris:AddItem(p,.1) wait()
  246. until not loopi
  247. end)()
  248. tc(torso,cfn(mouse.hit.p)*cfn(0,5,0),.1)
  249. loopi = false
  250. end
  251. function loud()
  252. tw(rw,cfn()*ang(md(40),md(-25),0),.1,'')
  253. for i = 0,1,.1 do wait()
  254. tip.Size = Vector3.new(1+i*1,2-i*1.5,1+i*1)
  255. tipw.Parent = ydin
  256. tipw.Part1 = tip
  257. end
  258. e = Instance.new("Explosion",Workspace)
  259. e.BlastPressure = 0
  260. e.Position = tip.Position
  261. e.Hit:connect(function(hit)
  262. local hum = FindHum(hit.Parent)
  263. if hum and hum.Parent ~= char then
  264. hum.Health = hum.Health -(3)
  265. hum.Sit = true
  266. hum.Torso.Velocity = cfn(e.Position,Vector3.new(hum.Torso.Position.x,torso.Position.y,hum.Torso.Position.z)).lookVector*100
  267. end
  268. end)
  269. coroutine.wrap(function()
  270. local p = Part(1,1,1,'Cyan',.5,1,0)
  271. p.CFrame = cfn(tip.CFrame.p)*ang(math.pi/2,0,0)
  272. msh = Mesh(p,'Ring')
  273. for i = 1,30 do wait()
  274. msh.Scale = Vector3.new(i,i,1)
  275. p.Transparency = i/30
  276. end
  277. p:Destroy()
  278. end)()
  279. q = Add.BV(torso,cfn(l(torso).p,l(torso,0,2,5).p).lookVector*100)
  280. Debris:AddItem(q,.5)
  281. tw(rw,equip,.1,'')
  282. for i = 1,0,-.1 do wait()
  283. tip.Size = Vector3.new(1+i*1,2-i*1.5,1+i*1)
  284. tipw.Parent = ydin
  285. tipw.Part1 = tip
  286. end
  287. end
  288. --/Attacks
  289. --Sounds
  290. Synth = Add.Sound("http://www.roblox.com/Asset/?id=46153268",1)
  291. --/Sounds
  292. --http://www.roblox.com/asset/?id=107431751
  293. --http://www.roblox.com/asset/?id=107431876
  294. klist = { --- Key Bindings
  295. f = slash;
  296. x = sit;
  297. eq = blast;
  298. qq = shoudon;
  299. t = teleport;
  300. c = loud;
  301. v = trip;
  302. }
  303. Keys = {}
  304. function CheckKeys(key)
  305. if Keys[key] then Keys[key] = _
  306. elseif not Keys[key] then Keys[key] = true
  307. end
  308. end
  309. hop.Selected:connect(function(mouse) Equip()
  310. mouse.Button1Up:connect(function() holding = false end)
  311. mouse.KeyUp:connect(function(key) CheckKeys(key) for i,v in pairs(klist) do if key == i:sub(1,1) and i:sub(2,2) == 'q' then holding = false end end end)
  312. mouse.KeyDown:connect(function(key)
  313. CheckKeys(key)
  314. if attacking then return end
  315. for i,v in pairs(klist) do
  316. if key == i:sub(1,1) then attacking = true v(mouse) attacking = false
  317. end
  318. end
  319. end)
  320. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement