Advertisement
CrazIIZen

CrazIIKatana

Apr 15th, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.20 KB | None | 0 0
  1. Me = game:service("Players").LocalPlayer
  2. Char = Me.Character
  3. Mouse = Me:GetMouse()
  4. Mode={"BloodLust","Normal"}
  5. DTable={}
  6. Combo = 0
  7. Name="CrazIIZen's Killer Katana"
  8. PrimaryColor = "Really black"
  9. SecondaryColor="Really red"
  10. pcall(function() Char:FindFirstChild("WepModel"):Destroy() Me.Backpack:FindFirstChild(Name):Destroy() end)
  11. Activated = false
  12. Sheathed = true
  13. Dashing = false
  14. Selected = false
  15. ADB=false
  16. DiffColor = false
  17. Camera=game:service("Workspace").CurrentCamera
  18. LeftArm = Char["Left Arm"]
  19. RightArm = Char["Right Arm"]
  20. HRP = Char.HumanoidRootPart["RootJoint"]
  21. SavedRoot = HRP.C0
  22. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  23. if script.Parent.className ~= "HopperBin" then
  24. h = Instance.new("HopperBin", Me.Backpack)
  25. h.Name = Name
  26. script.Name = "''"
  27. script.Parent = h
  28. end
  29. bin = script.Parent
  30. local WepModel = Instance.new("Model", Char)
  31. WepModel.Name = "WepModel"
  32. local Debz = game:service("Debris")
  33. ------[[ Create Function ]]------
  34. Create = {}
  35. function Create:Part(parent, x,y,z, color, transparency, cancollide, anchored, shape)
  36. c = Instance.new("Part",parent)
  37. c.Material = "Neon"
  38. if shape ~= nil then
  39. c.Shape = shape
  40. end
  41. c.TopSurface,c.BottomSurface = 0,0
  42. c.Locked = true
  43. c.formFactor = "Custom"
  44. c.Size = Vector3.new(x,y,z)
  45. if color ~= "random" then
  46. c.BrickColor = color
  47. else c.BrickColor = BrickColor:Random() end
  48. c.Transparency = transparency
  49. c.CanCollide = cancollide
  50. if anchored ~= nil then c.Anchored = anchored end
  51. if parent ~= nil then c.Parent = parent end
  52. return c
  53. end;
  54. function Create:BG(parent)
  55. local c = Instance.new("BodyGyro",parent)
  56. c.P = 20e+003
  57. c.cframe = parent.CFrame
  58. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  59. return c
  60. end;
  61. function Create:BP(parent, pos)
  62. local bp = Instance.new("BodyPosition",parent)
  63. bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  64. bp.position = pos
  65. return bp
  66. end;
  67. function Create:F(parent, size, heat, color, secondarycolor, enabled)
  68. f = Instance.new("Fire",parent)
  69. f.Size = size
  70. f.Heat = heat
  71. if enabled ~= nil then f.Enabled = enabled end
  72. if color ~= nil then f.Color = BrickColor.new(color).Color end
  73. if secondarycolor ~= nil then f.SecondaryColor = BrickColor.new(secondarycolor).Color end
  74. return f
  75. end;
  76. function Create:FM(parent, meshid, x,y,z, meshtexture)
  77. if meshid == "cylinder" then
  78. mesh = Instance.new("CylinderMesh",parent)
  79. mesh.Scale = Vector3.new(x,y,z)
  80. return mesh
  81. else
  82. mesh = Instance.new("SpecialMesh",parent)
  83. if meshid ~= "sphere" then
  84. if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  85. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  86. end
  87. else mesh.MeshType = 3 end
  88. mesh.Scale = Vector3.new(x,y,z)
  89. if meshtexture ~= nil then
  90. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  91. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  92. end
  93. return mesh
  94. end
  95. end
  96. function Create:Weld(parent,P0,P1,nam,c0,c1)
  97. Weld = Instance.new("Weld",parent)
  98. if P0 then Weld.Part0 = P0 else error("Invalid Part0",2) end
  99. if P1 then Weld.Part1 = P1 else print("Invalid Part1") end
  100. if name then Weld.Name = nam else Weld.Name = "Weld" end
  101. if c0 then Weld.C0 = c0 else print("Invalid C0") end
  102. if c1 then Weld.C1 = c1 else Weld.C1 = CFrame.new(0,0.5,0) end
  103. return Weld
  104. end
  105. M = {["Cos"] = function(a) return math.cos(a) end;
  106. ["Sin"] = function(a) return math.sin(a) end;
  107. ["Rad"] = function(a) return math.rad(a) end}
  108. L0L=Create:Part(WepModel,1,1,1,BrickColor.new(PrimaryColor),1,false,false)
  109. L0LWeld=Create:Weld(L0L,Char.Torso,L0L,"L0LWeld",CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(0,math.rad(-90),math.rad(90)),CFrame.new(0,-0.951,0))
  110. coroutine.wrap(function()
  111. for i = 0,1,1/50 do wait()
  112. angle = math.rad(360*i)
  113. end
  114. end)()
  115. local Delete = function(parent,time)
  116. if time then
  117. Debz:AddItem(parent,time)
  118. else
  119. parent:Destroy()
  120. end end
  121. Lite = Instance.new("PointLight")
  122. Lite.Color = Color3.new(255,0,0)
  123. Lite.Range = 20
  124. Lite.Brightness = 20
  125. Lite.Parent = Char.Torso
  126. Handle = Create:Part(WepModel,1,1,1,BrickColor.new(PrimaryColor),0,false,false)
  127. Instance.new("BlockMesh",Handle).Scale = Vector3.new(0.2,1.15,0.275)
  128. HandleWeld=Create:Weld(Handle,Char.Torso,Handle,"HandleWeld",CFrame.new(1.5,1.8,0.65)*CFrame.fromEulerAnglesXYZ(0,0,math.pi/-4.75))
  129. Hitbox = Create:Part(WepModel,1,6,0.5,BrickColor.new(PrimaryColor),1,false,false)
  130. Hitbox.Name = "Hitbox"
  131. Instance.new("BlockMesh", Hitbox)
  132. BoxWeld=Create:Weld(Hitbox,Handle,Hitbox,"Boxweld",CFrame.new(0,-2.5,0),CFrame.new(0,-0.25,0))
  133. Sheath = Create:Part(WepModel,1,1,1,BrickColor.new(PrimaryColor),0,false,false)
  134. Instance.new("BlockMesh",Sheath).Scale = Vector3.new(0.3,3,0.3)
  135. SheathWeld=Create:Weld(Char.Torso,Char.Torso,Sheath,"SheathWeld",CFrame.new(0.25,-0.1,0.65)*CFrame.fromEulerAnglesXYZ(0,0,math.pi/-4.75),CFrame.new(0.2,0.5,0))
  136. for i = 1,6 do
  137. Boxes = Create:Part(WepModel,1,1,1,BrickColor.new(SecondaryColor),0,false,false)
  138. Instance.new("BlockMesh",Boxes).Scale = Vector3.new(0.225,0.2,0.31)
  139. BoxesWeld=Create:Weld(Boxes,Char.Torso,Boxes,"BoxesWeld",CFrame.new(1.95,0,0.65)*CFrame.fromEulerAnglesXYZ(0,0,math.pi/-4.75),CFrame.new(1.55,i*0.5,0))
  140. end
  141. SheathTip = Create:Part(WepModel,1,1,1,BrickColor.new(PrimaryColor),0,false,false)
  142. SheathMesh = Instance.new("SpecialMesh", SheathTip)
  143. SheathMesh.MeshType = "Wedge"
  144. SheathMesh.Scale = Vector3.new(0.3,0.75,0.3)
  145. SheathTipWeld=Create:Weld(Char.Torso,Sheath,SheathTip,"SheathTipWeld",CFrame.new(0.25,-2,0.65)*CFrame.fromEulerAnglesXYZ(0,math.pi/2,3.15),CFrame.new(0.65,0.14,0.25))
  146. print(SheathTip.Position,SheathTip.Transparency)
  147. HandleBase = Create:Part(WepModel,1,1,1,BrickColor.new(PrimaryColor),0,false,false)
  148. Instance.new("BlockMesh",HandleBase).Scale = Vector3.new(0.45,0.25,0.45)
  149. HandleBaseWeld=Create:Weld(HandleBase,Handle,HandleBase,"HandleBaseWeld",CFrame.new(0,-0.175,0))
  150. Blade = Create:Part(WepModel,1,1,1,BrickColor.new(SecondaryColor),0,false,false)
  151. Instance.new("BlockMesh",Blade).Scale = Vector3.new(0.2,3,0.155)
  152. BladeWeld=Create:Weld(Blade,Handle,Blade,"BladeWeld",CFrame.new(0,-1.75,0))
  153. Blade2 = Create:Part(WepModel,1,1,1,BrickColor.new(PrimaryColor),0,false,false)
  154. Instance.new("BlockMesh",Blade2).Scale = Vector3.new(0.1,3,0.156)
  155. Blade2Weld=Create:Weld(Blade2,Handle,Blade2,"Blade2Weld",CFrame.new(0,-1.75,0))
  156. Tip = Create:Part(WepModel,1,1,1,BrickColor.new(SecondaryColor),0,false,false)
  157. TipMesh = Instance.new("SpecialMesh", Tip)
  158. TipMesh.MeshType = "Wedge"
  159. TipMesh.Scale = Vector3.new(0.155,0.5,0.2)
  160. TipWeld=Create:Weld(Tip,Handle,Tip,"TipWeld",CFrame.new(0,-4.5,0)*CFrame.fromEulerAnglesXYZ(0,math.pi/2,3.15),CFrame.new(0.01,0.5,0))
  161. Tip2 = Create:Part(WepModel,1,1,1,BrickColor.new(PrimaryColor),0,false,false)
  162. Tip2Mesh = Instance.new("SpecialMesh", Tip2)
  163. Tip2Mesh.MeshType = "Wedge"
  164. Tip2Mesh.Scale = Vector3.new(0.16,0.3,0.1)
  165. Tip2Weld=Create:Weld(Tip2,Handle,Tip2,"Tip2Weld",CFrame.new(0,-4.4,0)*CFrame.fromEulerAnglesXYZ(0,math.pi/2,3.15),CFrame.new(0.01,0.5,0))
  166. function Dash()
  167. Dashing = true
  168. DBounce=true
  169. playSound(153092348,Hitbox,1,1)
  170. local vel = Instance.new("BodyVelocity", Char.Torso)
  171. vel.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  172. coroutine.resume(coroutine.create(function()
  173. while Dashing == true do wait()
  174. vel.velocity = Char.Head.CFrame.lookVector * 70
  175. Effect(Char.Torso, 1,0.5,1, 0,0,1, 0,0,0,BrickColor.new("Really red"),true, 20329976,Char.Torso.CFrame*CFrame.new(0,-2.75,0).p)
  176. end
  177. end))
  178. wait(1)
  179. vel:remove()
  180. Dashing = false
  181. wait(1)
  182. DBounce=false
  183. end
  184. --Sound Func
  185. function playSound(id,parent,volume,pitch)
  186. local sound = Instance.new("Sound",parent or workspace)
  187. sound.SoundId = "http://www.roblox.com/asset?id="..id
  188. sound.Volume = volume or 1
  189. sound.Pitch = pitch or 1
  190. coroutine.wrap(function()
  191. wait()
  192. sound:Play()
  193. wait(10)
  194. sound:Stop()
  195. sound:Destroy()
  196. end)()
  197. return sound
  198. end
  199. --Play Sound
  200. function Shoot()
  201. Activated = true
  202. Charging = true
  203. Idle()
  204. StartTrail(Tip)
  205. for i = 0,1,0.1 do wait()
  206. RW.C0 = CFrame.new(1.5,0.5,0)*CFrame.fromEulerAnglesXYZ(1.5,0,0)
  207. RW.C1 = CFrame.new(0.1,0.4,0)*CFrame.fromEulerAnglesXYZ(0,-i*1.575,i*0.15)
  208. end
  209. coroutine.wrap(function()
  210. while Charging == true do wait()
  211. Effect2(Tip,0.4,0.4,0.4,0,0,0,BrickColor.new(SecondaryColor))
  212. end
  213. end)()
  214. end
  215. function FirstSlash()
  216. playSound(10209645,Hitbox,1,1)
  217. Activated = true
  218. Combo = 1
  219. StartTrail(Tip)
  220. pcall(function() Hitdmg=Hitbox.Touched:connect(function(hit) Damage(hit, math.random(5,10), hit.CFrame.p) end) end)
  221. Walk()
  222. for i = 0,1,0.175 do wait()
  223. LW.C1 = CFrame.new(0,0.5,0)*CFrame.fromEulerAnglesXYZ(0,0,i*0.3)
  224. RW.C1 = CFrame.new(0.1,0.4,0)*CFrame.fromEulerAnglesXYZ(i*2.15,i*-0.75,i*-1.5)
  225. HRP.C0 = SavedRoot*CFrame.fromEulerAnglesXYZ(0,0,i*2)
  226. Char.Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,-1.45*i)
  227. end
  228. EndTrail()
  229. Hitdmg:disconnect(wait(0.1))
  230. Activated = false
  231. end
  232. function SecondSlash()
  233. playSound(10209645,Hitbox,1,1.2)
  234. Activated = true
  235. Combo = 2
  236. StartTrail(Tip)
  237. pcall(function() Hitdmg=Hitbox.Touched:connect(function(hit) Damage(hit, math.random(5,10), hit.CFrame.p) end) end)
  238. for i = 0,1,0.2 do wait()
  239. RW.C0 = CFrame.new(1.45,0.4,0)*CFrame.fromEulerAnglesXYZ(1.5,0,0)
  240. RW.C1 = CFrame.new(0.1,0.4,0)*CFrame.fromEulerAnglesXYZ(0,-i*1.5,0)
  241. end
  242. for i = 0,1,0.2 do wait()
  243. Char.Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0.725*i)
  244. RW.C1 = CFrame.new(0,0.4,0)*CFrame.fromEulerAnglesXYZ(0,-1.5,i*-1.5)
  245. HRP.C0 = HRP.C1*CFrame.fromEulerAnglesXYZ(0,0,i*-0.875)
  246. end
  247. EndTrail()
  248. Hitdmg:disconnect(wait(0.1))
  249. Activated = false
  250. end
  251. function ThirdSlash()
  252. playSound(10209645,Hitbox,1,1.3)
  253. Activated=true
  254. Combo=3
  255. StartTrail(Tip)
  256. for i = 0,1,0.2 do wait()
  257. HRP.C1 = HRP.C1*CFrame.fromEulerAnglesXYZ(0,0,i*-0.25)
  258. RW.C0 = CFrame.new(1.45,0.4,0)*CFrame.fromEulerAnglesXYZ(1.5,0,0)
  259. RW.C1 = CFrame.new(0,i,-0.15)*CFrame.fromEulerAnglesXYZ(i*-1.05,0,i*0.85)
  260. LW.C0 = CFrame.new(-1.45,0.4,0)*CFrame.fromEulerAnglesXYZ(1.5,0,0)
  261. LW.C1 = CFrame.new(0,i,-0.15)*CFrame.fromEulerAnglesXYZ(i*-1.05,0,i*-0.85)
  262. Char.Torso.Neck.C0=necko
  263. HandleWeld.C0 = CFrame.new(0,-1.075,0.6)*CFrame.fromEulerAnglesXYZ(math.rad(45/2),math.rad(90),math.rad(69))
  264. HandleWeld.C1 = CFrame.new(0,0.3,0.25)*CFrame.Angles(math.rad(-40),math.rad(-12),math.rad(-10))
  265. end
  266. pcall(function() Hitdmg=Hitbox.Touched:connect(function(hit) Damage(hit, math.random(5,10), hit.CFrame.p,0)
  267. if hit:IsA("Part") then
  268. local evel = Instance.new("BodyVelocity", hit)
  269. evel.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  270. evel.velocity = Char.Torso.CFrame.lookVector * 100
  271. Delete(evel,0.025)
  272. end end) end)
  273. for i = 0,1,0.2 do wait()
  274. RW.C1 = RW.C1*CFrame.new(0,-0.05,0)*CFrame.fromEulerAnglesXYZ(i*0.75,0,0)
  275. LW.C1 = LW.C1*CFrame.new(0,-0.05,0)*CFrame.fromEulerAnglesXYZ(i*0.75,0,0)
  276. end
  277. Hitdmg:disconnect(wait(0.1))
  278. EndTrail()
  279. Activated=false
  280. end
  281. function BDown()
  282. if Activated then return end
  283. if Combo == 0 then
  284. FirstSlash()
  285. coroutine.wrap(function()
  286. wait(0.2)
  287. if Activated == false then
  288. Combo = 0
  289. end
  290. end)()
  291. elseif Combo == 1 then
  292. SecondSlash()
  293. coroutine.wrap(function()
  294. wait(0.2)
  295. if Activated == false then
  296. Combo = 0
  297. end
  298. end)()
  299. elseif Combo == 2 then
  300. ThirdSlash()
  301. coroutine.wrap(function()
  302. wait(0.2)
  303. if Activated == false then
  304. Combo = 0
  305. end
  306. end)()
  307. end
  308. end
  309. function key(key)
  310. if Activated then return end
  311. if key == "x" and not DBounce then
  312. Dash()
  313. end
  314. end
  315. function Walk()
  316. Camera.CameraSubject=Char.Humanoid
  317. Char.Humanoid.WalkSpeed = 50
  318. RW.C0 = CFrame.new(1.5,0.5,0)*CFrame.fromEulerAnglesXYZ(3.45,0,-0.2)
  319. RW.C1 = CFrame.new(0,0.35,0)*CFrame.fromEulerAnglesXYZ(3.5,0.5,0.9)
  320. LW.C0 = CFrame.new(-1.4,0.45,0)*CFrame.fromEulerAnglesXYZ(0.4,0.25,-0.5)
  321. LW.C1 = CFrame.new(0,0.5,0)
  322. HRP.C0 = SavedRoot*CFrame.fromEulerAnglesXYZ(0,0,-1.5)
  323. HRP.C1=CFrame.new(0,0,0,-1,-0,-0,0,0,1,0,1,0)
  324. Char.Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,1.5)
  325. HandleWeld.Part0 = RightArm
  326. HandleWeld.C0 = CFrame.new(0,-1.075,0.5)*CFrame.fromEulerAnglesXYZ(math.pi/2,math.pi/2,0)
  327. HandleWeld.C1 = CFrame.new(0,0.5,0)
  328. HandleWeld.Part1 = Handle
  329. end
  330.  
  331. function Idle()
  332. if RW and LW then
  333. RW.Part0 = Char.Torso
  334. RW.C0 = CFrame.new(1.5, 0.5, -0)*CFrame.fromEulerAnglesXYZ(0,0,0.2)
  335. RW.C1 = CFrame.new(0, 0.5, 0)
  336. RW.Part1 = RightArm
  337. LW.Part0 = Char.Torso
  338. LW.C0 = CFrame.new(-1.5, 0.5, 0)*CFrame.fromEulerAnglesXYZ(0,0,-0.2)
  339. LW.C1 = CFrame.new(0, 0.5, 0)
  340. LW.Part1 = LeftArm
  341. Char.Torso.Neck.C0=necko
  342. Camera.CameraSubject=Char.Humanoid
  343. HRP.C0=SavedRoot
  344. HRP.C1=CFrame.new(0,0,0,-1,-0,-0,0,0,1,0,1,0)
  345. Char.Humanoid.WalkSpeed = 100
  346. HandleWeld.Part0 = RightArm
  347. HandleWeld.C0 = CFrame.new(0,-1.075,0.5)*CFrame.fromEulerAnglesXYZ(math.pi/2,math.pi/2,0)
  348. HandleWeld.C1 = CFrame.new(0,0.5,0)
  349. HandleWeld.Part1 = Handle
  350. end
  351. end
  352. function Selection()
  353. for i = 0,1,0.1 do wait()
  354. RW.C0 = CFrame.new(1.5,0.5,0)*CFrame.fromEulerAnglesXYZ(3.45*i,0,i*-0.2)
  355. end
  356. playSound(130785405,Hitbox,1,1)
  357.  
  358. HandleWeld.Part0 = RightArm
  359. HandleWeld.C0 = CFrame.new(0,-1.075,0.5)*CFrame.fromEulerAnglesXYZ(math.pi/2,math.pi/2,0)
  360. HandleWeld.C1 = CFrame.new(0,0.5,0)
  361. HandleWeld.Part1 = Handle
  362. for i = 0,1,0.15 do wait()
  363. RW.C1 = CFrame.new(0,0.35,0)*CFrame.fromEulerAnglesXYZ(i*3.5,i*0.75,i)
  364. LW.C0 = CFrame.new(-1.4,0.45,0)*CFrame.fromEulerAnglesXYZ(i*0.4,i*0.25,i*-0.25)
  365. end
  366. Idle()
  367. Selected = true
  368. Sheathed = false
  369. end
  370. function s(mouse)
  371. if Sheathing then return end
  372. mouse.KeyDown:connect(key)
  373. mouse.Button1Down:connect(function() BDown(mouse) end)
  374. RSH = Char.Torso["Right Shoulder"]
  375. LSH = Char.Torso["Left Shoulder"]
  376. RW=Create:Weld(RightArm,Char.Torso,RightArm,"RW",CFrame.new(1.5, 0.5, -0)*CFrame.fromEulerAnglesXYZ(1.5,1.15,-0.25))
  377. LW=Create:Weld(LeftArm,Char.Torso,LeftArm,"LW",CFrame.new(-1.5, 0.5, 0)*CFrame.fromEulerAnglesXYZ(-0.5,0,-0.1))
  378. Selection()
  379. Idle()
  380. Sheathed = false
  381. end
  382. function ds()
  383. Sheathing = true
  384. RW.C0 = CFrame.new(1.5, 0.5, -0)
  385. RW.C1 = CFrame.new(0, 0.5, 0)
  386. for i =0,1,0.1 do wait()
  387. RW.C0 = CFrame.new(1.5,0.5,0)*CFrame.fromEulerAnglesXYZ(3.45*i,0,i*-0.2)
  388. end
  389. playSound(130785407,Hitbox,1,1)
  390. HandleWeld.Part0 = Char.Torso
  391. HandleWeld.C0 = CFrame.new(1.5,1.8,0.65)*CFrame.fromEulerAnglesXYZ(0,0,math.pi/-4.75)
  392. HandleWeld.C1 = CFrame.new(0,0.5,0)
  393. HandleWeld.Part1 = Handle
  394. pcall(function() HRP.C0 = SavedRoot
  395. RW.Parent = nil
  396. LW.Parent = nil
  397. Char.Torso.Neck.C0 = necko
  398. RSH.Parent = Char.Torso
  399. LSH.Parent = Char.Torso end)
  400. Sheathing = false
  401. Sheathed = true
  402. Char.Humanoid.WalkSpeed = 14
  403. end
  404. bin.Selected:connect(s)
  405. bin.Deselected:connect(ds)
  406. function StartTrail(part,color)
  407. trailin = true
  408. local lastPoint = part.Position
  409. coroutine.wrap(function()
  410. while trailin do wait()
  411. local point = CFrame.new(lastPoint, part.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  412. local mag = (lastPoint - part.Position).magnitude
  413. local p = Create:Part(Char,1,1,1,BrickColor.new(PrimaryColor),0.1,false,true)
  414. if color then p.BrickColor = BrickColor.new(color) end
  415. Instance.new("SpecialMesh",p).Scale=Vector3.new(0.125, mag, 0.125)
  416. p.CFrame = point * CFrame.new(0, mag/1.95, 0)
  417. lastPoint = part.Position
  418. coroutine.wrap(function() for i = 0,1,0.1 do wait() p.Transparency = i end p:Destroy() end)()
  419. end
  420. end)()
  421. end
  422. function EndTrail()
  423. trailin = false
  424. end
  425. Damage = function(hit, dmg, pos,time)
  426. if ADB == false then
  427. ADB = true
  428. coroutine.wrap(function()
  429. if time ==nil then
  430. ADB=false
  431. else
  432. wait(time)
  433. end
  434. ADB = false
  435. end)()
  436. if hit.Parent==nil and hit.Parent.Torso == nil then
  437. return
  438. print("hai")
  439. end
  440. if hit~=nil and hit.Parent ~= Char then
  441. hum = hit.Parent:FindFirstChild("Humanoid")
  442. if hum and hum.Health ~= 0 then
  443. playSound(153092292,Hitbox,1,1)
  444. critcalchance = math.ceil(math.random(1,15))
  445. if critcalchance == 5 then
  446. pcall(function() hum.Health = hum.Health - dmg*2 end)
  447. if hum.Health == 0 then
  448. KO=true
  449. else
  450. KO=false
  451. end
  452. crit = true
  453. else
  454. pcall(function() hum.Health = hum.Health - dmg end)
  455. if hum.Health == 0 then
  456. KO=true
  457. else
  458. KO=false
  459. end
  460. crit = false
  461. end
  462. mod = Instance.new("Model",game:service("Workspace"))
  463. if not KO then
  464. if crit == true then
  465. mod.Name = "-"..(dmg*2)
  466. else
  467. mod.Name = "-"..dmg
  468. end
  469. else
  470. mod.Name = "Soul.. TAKEN!"
  471. crit=true
  472. end
  473. mod.Name = "HERE"
  474. if not crit then
  475. p = Create:Part(mod,0.25,0.15,0.25, BrickColor.new(SecondaryColor),0.25,false,false)
  476. else
  477. p = Create:Part(mod,0.35,0.25,0.35, BrickColor.new("Really red"),0.25,false,false)
  478. end
  479. p.CFrame = CFrame.new(pos)*CFrame.new(0,1,math.random(-2,2))
  480. BP = Create:BP(p,p.Position+Vector3.new(0,6,0))
  481. BP.P = 1500
  482. s = Instance.new("SelectionBox",p)
  483. s.Adornee = s.Parent
  484. s.Transparency=p.Transparency
  485. s.Color = p.BrickColor
  486. local BGUI = Instance.new("BillboardGui",p)
  487. BGUI.Size = UDim2.new(1,0,1,0)
  488. BGUI.StudsOffset = Vector3.new(0,1,0)
  489. BGUI.Adornee = BGUI.Parent
  490. local frame = Instance.new("Frame",BGUI)
  491. frame.Size = UDim2.new(1, 0, 1, 0)
  492. frame.BackgroundTransparency = 1
  493. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  494. local BText = Instance.new("TextLabel",BGUI)
  495. BText.TextStrokeTransparency = 0
  496. BText.TextStrokeColor3 = BrickColor.new(PrimaryColor).Color
  497. BText.BackgroundTransparency = 1
  498. BText.Position = UDim2.new(0, 0, 0.1, 0)
  499. BText.FontSize = "Size18"
  500. BText.Size = UDim2.new(0.9, 0, 0.4, 0)
  501. if not crit and not KO then
  502. BText.Font = "SourceSans"
  503. BText.TextColor3 = BrickColor.new(SecondaryColor).Color
  504. elseif crit and not KO then
  505. BText.FontSize = "Size24"
  506. BText.Font = "SourceSans"
  507. BText.TextColor3 = BrickColor.new("Really red").Color
  508. elseif KO and crit then
  509. BText.FontSize = "Size36"
  510. BText.Font = "Legacy"
  511. BText.TextColor3 = BrickColor.new("Really red").Color
  512. end
  513. BText.Font = "SourceSans"
  514. BText.Text = mod.Name
  515. Delete(mod,2.5)
  516. coroutine.wrap(function()
  517. wait(0.5)
  518. for i = 0,1,0.035 do wait()
  519. BText.TextTransparency = i
  520. BText.TextStrokeTransparency = BText.TextStrokeTransparency + i
  521. end
  522. end)()
  523. end
  524. end
  525. end
  526. end
  527. function Effect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color,meshid,id,pos,collid)
  528. S=Create:Part(Char, 1,1,1, color, 0, false, true)
  529. if collid then
  530. S.CanCollide=collid
  531. else
  532. S.CanCollide=false
  533. end
  534. S.CFrame = CFrame.new(pos)
  535. S.CFrame=S.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  536. if meshid == true then
  537. local msh1 = Instance.new("SpecialMesh",S)
  538. msh1.Scale = Vector3.new(1,1,1)
  539. msh1.MeshType = "FileMesh"
  540. msh1.MeshId = "http://www.roblox.com/asset/?id="..id..""
  541. end
  542. if meshid == "block" then
  543. msh1 = Instance.new("BlockMesh",S)
  544. msh1.Scale = Vector3.new(1,1,1)
  545. elseif meshid == "ball" then
  546. local msh1 = Instance.new("SpecialMesh",S)
  547. msh1.Scale = Vector3.new(1,1,1)
  548. msh1.MeshType = "Sphere"
  549. end
  550. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(x1, y1, z1) Part.Transparency=i*.1 wait() end Part:Destroy() end),S,S.CFrame)
  551. end
  552. Lightning = function(Start,End,Times,Offset,Color,Thickness,Transparency)
  553. local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset}
  554. for i=1,Times do
  555. local li = Instance.new("Part",workspace)
  556. li.Material = "SmoothPlastic"
  557. li.TopSurface = "SmoothNoOutlines"
  558. li.BottomSurface = "SmoothNoOutlines"
  559. li.RightSurface = "SmoothNoOutlines"
  560. li.LeftSurface = "SmoothNoOutlines"
  561. li.Anchored = true li.Transparency =
  562. Transparency or 0.4 li.BrickColor =
  563. BrickColor.new(Color)
  564. li.formFactor = "Custom"
  565. li.CanCollide = false
  566. li.Size = Vector3.new(1,1,1)
  567. lim = Instance.new("BlockMesh",li)
  568. lim.Scale = Vector3.new(Thickness,Thickness,magz/Times)
  569. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  570. function touch(hit)
  571. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent ~= Char then
  572. Damage(hit, math.random(5,10), hit.CFrame.p)
  573. end end li.Touched:connect(touch)
  574. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  575. if Times == i then
  576. local magz2 = (curpos - End).magnitude lim.Scale = Vector3.new(Thickness,Thickness,magz2)
  577. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  578. else
  579. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  580. end
  581. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p game.Debris:AddItem(li,0.25)
  582. end
  583. end
  584. function Effect2(part,x1,y1,z1,x2,y2,z2,color)
  585. local msh2 = Instance.new("BlockMesh")
  586. msh2.Scale = Vector3.new(x1, y1, z1)
  587. S=Create:Part(Char, 1,1,1, color, 0.5, false, true)
  588. msh2.Parent = S
  589. S.CFrame=part.CFrame*CFrame.new(x2, y2, z2)*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  590. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) Part.CFrame=Part.CFrame*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  591. end
  592. coroutine.wrap(function()
  593. game:service("RunService").RenderStepped:connect(function()
  594. if not Sheathed and not Activated and not Sheathing and Combo == 0 then
  595. if Vector3.new(Char.Torso.Velocity.x, 0, Char.Torso.Velocity.z).magnitude > 2 then
  596. Walk()
  597. else
  598. Idle()
  599. end
  600. end
  601. end)
  602. end)()
  603. pcall(function() script.source.Value = "l0l" end)
  604. while true do game:GetService("RunService").RenderStepped:wait(-9001)
  605. if not Sheathed then
  606. wait(math.random(-1,2))
  607. lightswitch = math.random(1,2)
  608. if lightswitch == 1 then
  609. Lightning(HandleBase.CFrame*CFrame.new(0,1,0).p,Tip.CFrame.p,math.random(3,6),math.random(-0.75,0.75),"Really red",0.04,0.2)
  610. elseif lightswitch == 2 then
  611. Lightning(HandleBase.CFrame*CFrame.new(0,1,0).p,Tip.CFrame.p,math.random(3,6),math.random(-0.75,0.75),PrimaryColor,0.04,0.2)
  612. end
  613. end
  614. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement