Advertisement
mathmasterphil

White Katana,Works!

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