Advertisement
KeroroGunso0

Sword test

Jul 1st, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.86 KB | None | 0 0
  1. script/player = game.Players.KeroroGunso2016
  2. damage = 6
  3.  
  4. if script.Parent:IsA("Tool") then return end
  5. tool = Instance.new("Tool")
  6. script.Parent = tool
  7. tool.GripPos = Vector3.new(0, -2.4, 0)
  8. tool.Name = "Sword"
  9. tool.Parent = player.Backpack
  10. local clicks = Instance.new("NumberValue")
  11. clicks.Parent = tool
  12. clicks.Value = 0
  13. handle = Instance.new("Part")
  14. handle.Name = "Handle"
  15. handle.Size = Vector3.new(1,4,1)
  16. handle.TopSurface = 0
  17. handle.BottomSurface = 0
  18. handle.BrickColor = BrickColor.new(21)
  19. local mesh = Instance.new("BlockMesh")
  20. mesh.Parent = handle
  21. mesh.Scale = Vector3.new(0.2, 1, 0.9)
  22.  
  23. local sla = Instance.new("Sound")
  24. sla.Parent = handle
  25. sla.Volume = .7
  26. sla.SoundId = "rbxasset://sounds\\swordslash.wav"
  27.  
  28. local lun = Instance.new("Sound")
  29. lun.Parent = handle
  30. lun.Volume = .7
  31. lun.SoundId = "rbxasset://sounds\\swordlunge.wav"
  32.  
  33. local spinSound= Instance.new("Sound")
  34. spinSound.SoundId = "http://www.roblox.com/asset/?id=28144425"
  35. spinSound.Volume = 1
  36. spinSound.Parent = handle
  37.  
  38. local handle2 = Instance.new("Part")
  39. handle2.Size = Vector3.new(1,1,2)
  40. handle2.TopSurface = 0
  41. handle2.BottomSurface = 0
  42. handle2.BrickColor = BrickColor.new(26)
  43. handle2.CanCollide = false
  44. local mesh2 = Instance.new("BlockMesh")
  45. mesh2.Parent = handle2
  46. mesh2.Scale = Vector3.new(0.7, 0.4, 0.7)
  47. local handle3 = Instance.new("Part")
  48. handle3.Size = Vector3.new(1,1,1)
  49. handle3.TopSurface = 0
  50. handle3.BottomSurface = 0
  51. handle3.BrickColor = BrickColor.new(26)
  52. handle3.CanCollide = false
  53. local mesh3 = Instance.new("SpecialMesh")
  54. mesh3.Parent = handle3
  55. mesh3.MeshType = "Head"
  56. mesh3.Scale = Vector3.new(0.4, 1.2, 0.4)
  57. local handle4 = Instance.new("Part")
  58. handle4.Size = Vector3.new(1,1,1)
  59. handle4.TopSurface = 0
  60. handle4.BottomSurface = 0
  61. handle4.CanCollide = false
  62. handle4.BrickColor = BrickColor.new(21)
  63. local mesh4 = Instance.new("SpecialMesh")
  64. mesh4.Parent = handle4
  65. mesh4.MeshType = "Wedge"
  66. mesh4.Scale = Vector3.new(0.2, 1.4, 0.9)
  67. handle.Parent = tool
  68. handle2.Parent = tool
  69. handle3.Parent = tool
  70. handle4.Parent = tool
  71.  
  72. function equip()
  73. local w1 = Instance.new("Weld")
  74. w1.Parent = handle
  75. w1.Part0 = w1.Parent
  76. w1.Part1 = handle2
  77. w1.C1 = CFrame.new(0, 1.6, 0)
  78. local w2 = Instance.new("Weld")
  79. w2.Parent = handle
  80. w2.Part0 = w1.Parent
  81. w2.Part1 = handle3
  82. w2.C1 = CFrame.new(0, 2.25, 0)
  83. local w3 = Instance.new("Weld")
  84. w3.Parent = handle
  85. w3.Part0 = w1.Parent
  86. w3.Part1 = handle4
  87. w3.C1 = CFrame.new(0, -2.58, 0)
  88. end
  89. local fire = Instance.new("Fire")
  90. fire.Parent = handle
  91. fire.Size = 1
  92. fire.Heat = 5
  93. local fire2 = Instance.new("Fire")
  94. fire2.Parent = handle4
  95. fire2.Size = 1
  96. fire2.Heat = 5
  97. fire.Enabled = false
  98. fire2.Enabled = false
  99.  
  100. function b(h)
  101. if h.Parent.className == "Tool" then return end
  102. if h.Parent.className == "Hat" then return end
  103. if h.Name == "Base" then return end
  104. if h.Name == "Blood" then return end
  105. if h.Name == "Part" then return end
  106. if h.Name == "Handle" then return end
  107. local hum = h.Parent:findFirstChild("Humanoid")
  108. if hum == nil then return end
  109. local par = game.Players:findFirstChild(h.Parent.Parent.Name)
  110. if par ~= nil then return end
  111. hum.Health = hum.Health - damage
  112. for i=1, 7 do
  113. local blood = Instance.new("Part")
  114. blood.Parent = game.Workspace
  115. blood.BrickColor = BrickColor.new(21)
  116. blood.formFactor = "Plate"
  117. blood.Size = Vector3.new(1, 0.4, 1)
  118. blood.CFrame = h.CFrame
  119. blood.TopSurface = "Smooth"
  120. blood.BottomSurface = "Smooth"
  121. blood.Name = "Blood"
  122. blood.Anchored = false
  123. blood.Velocity = Vector3.new(math.random(-40,40), math.random(0,50), math.random(-40,40))
  124. blood.RotVelocity = Vector3.new(math.random(-40,40), math.random(-40,40), math.random(-40,40))
  125. blood.CanCollide = false
  126. blood:breakJoints()
  127. local mesff = Instance.new("SpecialMesh")
  128. mesff.Parent = blood
  129. mesff.MeshType = "Brick"
  130. mesff.Scale = Vector3.new(0.6, 0.6, 0.6)
  131. end
  132. local s = Instance.new("Part")
  133. s.Parent = game.Workspace
  134. s.Size = Vector3.new(1, 1, 1)
  135. s.CFrame = handle.CFrame
  136. s.Name = "sparkle"
  137. s.Anchored = true
  138. s.Transparency = 1
  139. s.CanCollide = false
  140. local spa = Instance.new("Sparkles")
  141. spa.Parent = s
  142. spa.Color = Color3.new(0,1,1)
  143. wait(0.3)
  144. s:remove()
  145. end
  146.  
  147. handle.Touched:connect(b)
  148. handle4.Touched:connect(b)
  149.  
  150. function firea()
  151. fire.Enabled = true
  152. fire2.Enabled = true
  153. wait(0.35)
  154. fire.Enabled = false
  155. fire2.Enabled = false
  156. end
  157.  
  158. function hit()
  159. clicks.Value = clicks.Value + 1
  160. if clicks.Value == 1 then
  161. firea()
  162. sla:Play()
  163. ved = player.Character.Torso["Right Shoulder"]
  164. waa = ved.C1
  165. ved.C1 = waa
  166. for i = 1, 10 do
  167. wait(0.01)
  168. ved.C1 = ved.C1 * CFrame.fromEulerAnglesXYZ(0,-0.14,0)
  169. end
  170. wait(0.1)
  171. for i = 1, 5 do
  172. wait(0.01)
  173. ved.C1 = ved.C1 * CFrame.fromEulerAnglesXYZ(0.6,0,0)
  174. end
  175. wait(0.12)
  176. ved.C1 = waa
  177. end
  178. if clicks.Value == 2 then
  179. ved = player.Character.Torso["Right Shoulder"]
  180. waa = ved.C1
  181. ved.C1 = waa
  182. for i = 1, 10 do
  183. wait(0.01)
  184. ved.C1 = ved.C1 * CFrame.fromEulerAnglesXYZ(0.13,0.09,-0.05)
  185. end
  186. wait(0.1)
  187. for i = 1, 5 do
  188. wait(0.01)
  189. ved.C1 = ved.C1 * CFrame.fromEulerAnglesXYZ(-0.6,0,0)
  190. end
  191. wait(0.12)
  192. ved.C1 = waa
  193. end
  194. if clicks.Value == 3 then
  195. ved = player.Character.Torso["Right Shoulder"]
  196. waa = ved.C1
  197. ved.C1 = waa
  198. for i = 1, 8 do
  199. wait(0.02)
  200. ved.C1 = ved.C1 * CFrame.fromEulerAnglesXYZ(0.04,0.085,-0.25)
  201. end
  202. wait(0.1)
  203. for i = 1, 6 do
  204. wait(0.01)
  205. ved.C1 = ved.C1 * CFrame.fromEulerAnglesXYZ(0,-0.12,0.6)
  206. end
  207. wait(0.12)
  208. ved.C1 = waa
  209. end
  210. if clicks.Value == 4 then
  211. lun:Play()
  212. local ani = Instance.new("StringValue")
  213. ani.Name = "toolanim"
  214. ani.Value = "Lunge"
  215. ani.Parent = tool
  216. fire.Enabled = true
  217. fire.Size = 4
  218. fire.Heat = 40
  219. wait(.12)
  220. swordOut()
  221. wait(0.07)
  222. local pa = Instance.new("Part")
  223. pa.Parent = game.Workspace
  224. pa.formFactor = "Symmetric"
  225. pa.Size = Vector3.new(1,1,1)
  226. pa.Transparency = 1
  227. pa.CanCollide = false
  228. pa.Anchored = false
  229. pa.CFrame = handle.CFrame * CFrame.new(0, -2, 5)
  230. pa.Velocity = tool.Parent.Torso.CFrame.lookVector*150
  231. pa.Velocity = pa.Velocity + Vector3.new(0, 8, 0)
  232. pa.TopSurface = 0
  233. pa.BottomSurface = 0
  234. pa.Name = "Blood"
  235. pa:breakJoints()
  236. local fia = Instance.new("Fire")
  237. fia.Parent = pa
  238. fia.Size = 4
  239. fia.Heat = 2
  240. local fi3 = Instance.new("Fire")
  241. fi3.Parent = pa
  242. fi3.Size = 4
  243. fi3.Heat = 2
  244. kool = false
  245. local ve = Instance.new("CFrameValue")
  246. ve.Parent = tool.Parent.Torso
  247. ve.Value = ve.Parent.CFrame
  248. local spivel = Instance.new("BodyForce")
  249. spivel.Parent = tool.Parent.Torso
  250. spivel.force = ve.Value.lookVector*4000
  251. spivel.force = spivel.force + Vector3.new(0, 2000, 0)
  252. pa.Touched:connect(function(hif)
  253. if hif.Parent.Name == player.Name then return end
  254. if kool == true then return end
  255. kool = true
  256. local hum = hif.Parent:findFirstChild("Humanoid")
  257. if hum ~= nil then
  258. hum.Health = hum.Health - 18
  259. fia.Parent = hif
  260. fi3.Parent = hif
  261. fia.Heat = 30
  262. fi3.Heat = 30
  263. fia.Size = 3
  264. fi3.Size = 3
  265. end
  266. end)
  267. wait(.25)
  268. swordUp()
  269. fire.Enabled = false
  270. fire.Size = 1
  271. fire.Heat = 5
  272. spivel:remove()
  273. end
  274. function swordUp()
  275. tool.GripForward = Vector3.new(0,0,1)
  276. tool.GripRight = Vector3.new(1,0,0)
  277. tool.GripUp = Vector3.new(0,1,0)
  278. end
  279.  
  280. function swordOut()
  281. tool.GripForward = Vector3.new(0,0,1)
  282. tool.GripRight = Vector3.new(1,0,0)
  283. tool.GripUp = Vector3.new(0,1,6)
  284. end
  285.  
  286. function swordspin()
  287. tool.GripForward = Vector3.new(0,0,1)
  288. tool.GripRight = Vector3.new(0,1,0)
  289. tool.GripUp = Vector3.new(0,1,6)
  290. end
  291.  
  292. if clicks.Value == 5 then
  293. fire2.Enabled = true
  294. fire2.Size = 3
  295. fire2.Heat = 40
  296. local fra = tool.Parent.Torso["Right Shoulder"].C0
  297. local spinForce = Instance.new("BodyAngularVelocity")
  298. spinForce.P = 1000000
  299. spinForce.angularvelocity = Vector3.new(0,23,0)
  300. spinForce.maxTorque = Vector3.new(spinForce.P,spinForce.P,spinForce.P)
  301. spinForce.Parent = tool.Parent.Torso
  302. spinSound:play()
  303. swordspin()
  304. wait(1)
  305. spinForce:remove()
  306. swordUp()
  307. tool.Parent.Torso["Right Shoulder"].C0 = fra
  308. damage = 6
  309. fire2.Enabled = false
  310. fire2.Size = 1
  311. fire2.Heat = 5
  312. end
  313. if clicks.Value == 6 then
  314. ved = player.Character.Torso["Right Shoulder"]
  315. wee = ved.C1
  316. for i = 1, 46 do
  317. wait()
  318. ved.C1 = ved.C1 * CFrame.fromEulerAnglesXYZ(0,0,0.6)
  319. end
  320. local boom = Instance.new("Part")
  321. boom.Parent = workspace
  322. boom.BrickColor = BrickColor.new(21)
  323. boom.Size = Vector3.new(14,1,14)
  324. boom.CanCollide = false
  325. boom.Transparency = 0.1
  326. boom.Anchored = true
  327. boom.CFrame = player.Character.Torso.CFrame * CFrame.new(0,-4,0)
  328. local mes = Instance.new("CylinderMesh")
  329. mes.Parent = boom
  330. mes.Scale = Vector3.new(0.4,1,0.4)
  331. boom.TopSurface = 0
  332. boom.BottomSurface = 0
  333. boom.Touched:connect(function(hit)
  334. local hi = hit.Parent:findFirstChild("Humanoid")
  335. if hi ~= nil then
  336. if hit.Parent.Name == "xSoulStealerx" then return end
  337. hit.Parent.Torso.Velocity = Vector3.new(math.random(-20,20),math.random(60,110),math.random(-20,20))
  338. hit.Parent.Torso.RotVelocity = Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  339. hi.Sit = true
  340. hi.Health = hi.Health - 15
  341. wait(0.5)
  342. hi.Sit = false
  343. end
  344. hit.Velocity = Vector3.new(math.random(-20,20),math.random(60,110),math.random(-20,20))
  345. hit.RotVelocity = Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  346. end)
  347. for i=1, 25 do
  348. mes.Scale = mes.Scale + Vector3.new(0.06, 0.004, 0.06)
  349. boom.Transparency = boom.Transparency + 0.04
  350. boom.CFrame = boom.CFrame * CFrame.new(0, 0.1, 0)
  351. wait()
  352. end
  353. boom:remove()
  354. wait(0.3)
  355. ved.C1 = wee
  356. clicks.Value = 0
  357. end
  358. end
  359.  
  360. function onActivated()
  361. if not tool.Enabled then
  362. return
  363. end
  364.  
  365. tool.Enabled = false
  366. hit()
  367. tool.Enabled = true
  368.  
  369. end
  370.  
  371. tool.Activated:connect(onActivated)
  372.  
  373. tool.Equipped:connect(equip)
  374.  
  375. while true do
  376. wait(8)
  377. pcall(b)
  378. clicks.Value = 0
  379. end
  380.  
  381. --lego
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement