Sazious

Untitled

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