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