Advertisement
CaptianFE

Kantanna FE (might not work)

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