Advertisement
icy-desudesu

Icy's Icy Sword

Aug 2nd, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2.  
  3. Cha = Player.Character
  4.  
  5. RShoulder = Cha.Torso['Right Shoulder']
  6.  
  7. Tool = Instance.new("HopperBin",Player.Backpack)
  8.  
  9. Tool.Name = "ice sword"
  10.  
  11.  
  12. function onKeyDown(key)
  13.  
  14. key = key:lower()
  15.  
  16. if key == "e" then
  17.  
  18. wal = not wal
  19.  
  20. if wal == true then
  21.  
  22. wl=Instance.new("Part",workspace)
  23.  
  24. wl.BrickColor=BrickColor.new("Toothpaste")
  25.  
  26. wl.Material="Ice"
  27.  
  28. wl.Size=Vector3.new(10,7,2)
  29.  
  30. wl.Anchored=true
  31.  
  32. wl.CFrame=Cha.Torso.CFrame*CFrame.new(0,0,-5)
  33.  
  34. wl2=wl:Clone()
  35.  
  36. wl2.Parent=Workspace
  37.  
  38. wl2.Size=Vector3.new(2,7,10)
  39.  
  40. wl2.CFrame=Cha.Torso.CFrame*CFrame.new(-5,0,0)
  41.  
  42. wl3=wl2:Clone()
  43.  
  44. wl3.Parent=Workspace
  45.  
  46. wl3.CFrame=Cha.Torso.CFrame*CFrame.new(5,0,0)
  47.  
  48. wl4=wl:Clone()
  49.  
  50. wl4.Parent=Workspace
  51.  
  52. wl4.CFrame=Cha.Torso.CFrame*CFrame.new(0,0,5)
  53.  
  54. else
  55.  
  56. for i=1,10 do wait()
  57.  
  58. wl.Transparency=wl.Transparency +.1
  59.  
  60. wl2.Transparency=wl2.Transparency +.1
  61.  
  62. wl3.Transparency=wl3.Transparency +.1
  63.  
  64. wl4.Transparency=wl4.Transparency +.1
  65.  
  66. wait()
  67.  
  68. end
  69.  
  70. wl:remove()
  71.  
  72. wl2:remove()
  73.  
  74. wl3:remove()
  75.  
  76. wl4:remove()
  77.  
  78. end
  79.  
  80. end
  81.  
  82. end
  83.  
  84.  
  85. function onClicked(mouse)
  86.  
  87. if (not vDebounce) then
  88.  
  89. vDebounce = true
  90.  
  91. wa = Instance.new("Part",Char)
  92.  
  93. wa.Transparency=1
  94.  
  95. wa.CanCollide = false
  96.  
  97. wa.Size = Vector3.new(1, 1, 1)
  98.  
  99. wa:BreakJoints()
  100.  
  101. Weld3 = Instance.new("Weld",wa)
  102.  
  103. Weld3.Part0 = Blade
  104.  
  105. Weld3.Part1 = wa
  106.  
  107. Weld3.C0 = CFrame.new(0, 0, -2) * CFrame.Angles(0, 0, 0)
  108.  
  109. function touch(hit)
  110.  
  111. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  112.  
  113. hit.Parent.Humanoid.Health=hit.Parent.Humanoid.Health-5
  114.  
  115. end end wa.Touched:connect(touch)
  116.  
  117. animation = Instance.new("Animation")
  118.  
  119. animation.Name = "SlashAnim"
  120.  
  121. animation.AnimationId = "http://www.roblox.com/Asset?ID=94161088"
  122.  
  123. animTrack = Cha.Humanoid:LoadAnimation(animation)
  124.  
  125. animTrack:Play()
  126.  
  127. for i = 1,26 do wait()
  128.  
  129. p = Instance.new("Part",workspace)
  130.  
  131. p.FormFactor="Custom"
  132.  
  133. p.Size=Vector3.new(.5,.5,.5)
  134.  
  135. p.TopSurface = 0
  136.  
  137. p.BottomSurface = 0
  138.  
  139. p.BrickColor=BrickColor.new("Toothpaste")
  140.  
  141. p.Transparency=.3
  142.  
  143. p.CanCollide=false
  144.  
  145. p.Anchored=true
  146.  
  147. p.CFrame =(Blade.CFrame*CFrame.new(0,0,-2))*CFrame.Angles(math.random(-3,3),math.random(-3,3),math.random(-3,3))
  148.  
  149. game.Debris:AddItem(p,.1)
  150.  
  151. end
  152.  
  153. wa:remove()
  154.  
  155. vDebounce = false
  156.  
  157. end
  158.  
  159. end
  160.  
  161.  
  162. Tool.Selected:connect(function(mouse)
  163.  
  164. mouse.Button1Down:connect(function() onClicked(mouse) end)
  165.  
  166. mouse.KeyDown:connect(onKeyDown)
  167.  
  168. --==THE ASSIMBLE==--
  169.  
  170.  
  171. Char=Instance.new("Model",Cha) -- CHA not CHAR
  172.  
  173. Handle = Instance.new("Part", Char)
  174.  
  175. Handle.FormFactor = "Custom"
  176.  
  177. Handle.Size = Vector3.new(1, -1, 1)
  178.  
  179. Handle.TopSurface = "Smooth"
  180.  
  181. Handle.BottomSurface = "Smooth"
  182.  
  183. Handle.BrickColor = BrickColor.new("Toothpaste")
  184.  
  185. Handle.Reflectance = 0
  186.  
  187. Handle:BreakJoints()
  188.  
  189. Handle.CanCollide=false
  190.  
  191. Mesh = Instance.new("SpecialMesh", Handle)
  192.  
  193. Mesh.MeshType = "Cylinder"
  194.  
  195. Mesh.Scale = Vector3.new(1, 1, 1)
  196.  
  197. HandleWeld = Instance.new("Weld", Char)
  198.  
  199. HandleWeld.Part0 = Cha["Right Arm"]
  200.  
  201. HandleWeld.Part1 = Handle
  202.  
  203. HandleWeld.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(0, math.pi/2, 0)
  204.  
  205. Power = Instance.new("Part", Char)
  206.  
  207. Power.FormFactor = "Custom"
  208.  
  209. Power.Size = Vector3.new(1, 1, 1)
  210.  
  211. Power.TopSurface = "Smooth"
  212.  
  213. Power.BottomSurface = "Smooth"
  214.  
  215. Power.BrickColor = BrickColor.new("Institutional white")
  216.  
  217. Power.Reflectance = 0
  218.  
  219. Power:BreakJoints()
  220.  
  221. Power.CanCollide=false
  222.  
  223. Mesh = Instance.new("SpecialMesh", Power)
  224.  
  225. Mesh.MeshType = "Sphere"
  226.  
  227. Mesh.Scale = Vector3.new(1, 1, 1)
  228.  
  229. PowerWeld = Instance.new("Weld", Char)
  230.  
  231. PowerWeld.Part0 = Cha["Right Arm"]
  232.  
  233. PowerWeld.Part1 = Power
  234.  
  235. PowerWeld.C0 = CFrame.new(0, -1, 1) * CFrame.Angles(0, 0, 0)
  236.  
  237. Detail = Instance.new("Part", Char)
  238.  
  239. Detail.FormFactor = "Custom"
  240.  
  241. Detail.Size = Vector3.new(1, -1, 1)
  242.  
  243. Detail.TopSurface = "Smooth"
  244.  
  245. Detail.BottomSurface = "Smooth"
  246.  
  247. Detail.BrickColor = BrickColor.new("Institutional white")
  248.  
  249. Detail.Reflectance = 0
  250.  
  251. Detail:BreakJoints()
  252.  
  253. Detail.CanCollide=false
  254.  
  255. Mesh = Instance.new("SpecialMesh", Detail)
  256.  
  257. Mesh.MeshType = "Cylinder"
  258.  
  259. Mesh.Scale = Vector3.new(1, 1, 1)
  260.  
  261. DetailWeld = Instance.new("Weld", Char)
  262.  
  263. DetailWeld.Part0 = Cha["Right Arm"]
  264.  
  265. DetailWeld.Part1 = Detail
  266.  
  267. DetailWeld.C0 = CFrame.new(0, -1, math.rad(-30)) * CFrame.Angles(0, 0, math.rad(90))
  268.  
  269. Blade = Instance.new("Part", Char)
  270.  
  271. Blade.FormFactor = "Custom"
  272.  
  273. Blade.Size = Vector3.new(-1, -2, 4)
  274.  
  275. Blade.TopSurface = "Smooth"
  276.  
  277. Blade.BottomSurface = "Smooth"
  278.  
  279. Blade.BrickColor = BrickColor.new("Institutional white")
  280.  
  281. Blade.Reflectance = 0
  282.  
  283. Blade:BreakJoints()
  284.  
  285. Blade.CanCollide=false
  286.  
  287. Mesh = Instance.new("BlockMesh", Blade)
  288.  
  289. Mesh.Scale = Vector3.new(1, 1, 1)
  290.  
  291. BladeWeld = Instance.new("Weld", Char)
  292.  
  293. BladeWeld.Part0 = Cha["Right Arm"]
  294.  
  295. BladeWeld.Part1 = Blade
  296.  
  297. BladeWeld.C0 = CFrame.new(0, -1, -2) * CFrame.Angles(0, 0, math.rad(90))
  298.  
  299. end)
  300.  
  301. Tool.Deselected:connect(function(mouse)
  302.  
  303. Char:remove()
  304.  
  305. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement