Advertisement
Guest User

Untitled

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