Advertisement
WagnerJunio07

TANTO FAZ

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