Versqual

Untitled

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