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 | - | lp = pls.LocalPlayer |
| 10 | + | --RemoteEvent for communicating |
| 11 | - | mouse = lp:GetMouse() |
| 11 | + | local Event = Instance.new("RemoteEvent")
|
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent and t.Function then | |
| 34 | t.Function(...) | |
| 35 | end | |
| 36 | end | |
| 37 | m.TrigEvent = te | |
| 38 | UIS.TrigEvent = te | |
| 39 | ||
| 40 | Event.OnServerEvent:Connect(function(plr,io) | |
| 41 | if plr~=Player then return end | |
| 42 | if io.isMouse then | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | else | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").LocalPlayer
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local UIS = game:GetService("UserInputService")
| |
| 66 | local input = function(io,a) | |
| 67 | if a then return end | |
| 68 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 70 | end | |
| 71 | UIS.InputBegan:Connect(input) | |
| 72 | UIS.InputEnded:Connect(input) | |
| 73 | ||
| 74 | local Mouse = Player:GetMouse() | |
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 85 | end | |
| 86 | ||
| 87 | -- BurnLegion strikes again! | |
| 88 | -- wongxd, this is why you DON'T goto Voidacity's | |
| 89 | -- SLPM has been absent, so I've taken it upon myself to make something | |
| 90 | ||
| 91 | -------------------------------------------------------- | |
| 92 | ||
| 93 | pls = game:GetService'Players' | |
| 94 | rs = game:GetService'RunService' | |
| 95 | uinps = game:GetService'UserInputService' | |
| 96 | lp = owner | |
| 97 | c = lp.Character | |
| 98 | human = c.Humanoid | |
| 99 | human.MaxHealth = 50 | |
| 100 | wait() | |
| 101 | human.Health = 50 | |
| 102 | c.Health:Destroy() | |
| 103 | ||
| 104 | -------------------------------------------------------- | |
| 105 | ||
| 106 | Debounces = {
| |
| 107 | AnimationCycles = 0; | |
| 108 | FPS = 0; | |
| 109 | scalingDamage = false; | |
| 110 | damageLevel = 0; | |
| 111 | attackNumber = 0; | |
| 112 | isAttacking = false; | |
| 113 | isMoving = false; | |
| 114 | isSprinting = false; | |
| 115 | isBoosting = false; | |
| 116 | isPassive = false; | |
| 117 | isTyping = false; | |
| 118 | } | |
| 119 | ||
| 120 | -------------------------------------------------------- | |
| 121 | ||
| 122 | numLerp = function(start, goal, alpha) | |
| 123 | return(((goal - start) * alpha) + start) | |
| 124 | end | |
| 125 | ||
| 126 | CFrameZero = function() | |
| 127 | return CFrame.new(Vector3.new()) | |
| 128 | end | |
| 129 | ||
| 130 | rad = function(value) | |
| 131 | return math.rad(value) | |
| 132 | end | |
| 133 | ||
| 134 | CFAngles = function(Vector) | |
| 135 | return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z)) | |
| 136 | end | |
| 137 | ||
| 138 | -------------------------------------------------------- | |
| 139 | ||
| 140 | AnimStat = {
| |
| 141 | lerpSpeed = .2; | |
| 142 | lerpSpeed2 = .35; | |
| 143 | lerpTween = 0; | |
| 144 | } | |
| 145 | ||
| 146 | Joints = {
| |
| 147 | c.HumanoidRootPart.RootJoint; | |
| 148 | c.Torso.Neck; | |
| 149 | c.Torso['Left Shoulder']; | |
| 150 | c.Torso['Right Shoulder']; | |
| 151 | c.Torso['Left Hip']; | |
| 152 | c.Torso['Right Hip']; | |
| 153 | } | |
| 154 | ||
| 155 | JointTargets = {
| |
| 156 | CFrameZero(); | |
| 157 | CFrameZero(); | |
| 158 | CFrameZero(); | |
| 159 | CFrameZero(); | |
| 160 | CFrameZero(); | |
| 161 | CFrameZero(); | |
| 162 | } | |
| 163 | ||
| 164 | -------------------------------------------------------- | |
| 165 | ||
| 166 | BodyColors = {
| |
| 167 | HeadColor = BrickColor.new("Institutional white");
| |
| 168 | LeftArmColor = BrickColor.new("Institutional white");
| |
| 169 | RightArmColor = BrickColor.new("Institutional white");
| |
| 170 | LeftLegColor = BrickColor.new("Institutional white");
| |
| 171 | RightLegColor = BrickColor.new("Institutional white");
| |
| 172 | TorsoColor = BrickColor.new("Mid gray");
| |
| 173 | } | |
| 174 | ||
| 175 | Customs = {
| |
| 176 | Face = "http://www.roblox.com/asset/?id=8560915"; | |
| 177 | Shirt = "http://www.roblox.com/asset/?id=334781688"; | |
| 178 | Pants = "http://www.roblox.com/asset/?id=335237283"; | |
| 179 | } | |
| 180 | ||
| 181 | -------------------------------------------------------- | |
| 182 | ||
| 183 | prepareCharacter = function() | |
| 184 | local transPoints = {
| |
| 185 | NumberSequenceKeypoint.new(0,.819,.0375), | |
| 186 | NumberSequenceKeypoint.new(.207,.594,.0187), | |
| 187 | NumberSequenceKeypoint.new(.4,.55,.031), | |
| 188 | NumberSequenceKeypoint.new(.57,.619,.05), | |
| 189 | NumberSequenceKeypoint.new(.76,.8,.0375), | |
| 190 | NumberSequenceKeypoint.new(1,1,0), | |
| 191 | } | |
| 192 | local sizePoints = {
| |
| 193 | NumberSequenceKeypoint.new(0,.687,0), | |
| 194 | NumberSequenceKeypoint.new(.111,.875,0), | |
| 195 | NumberSequenceKeypoint.new(.327,1.19,0), | |
| 196 | NumberSequenceKeypoint.new(.646,1.56,0), | |
| 197 | NumberSequenceKeypoint.new(.805,1.37,0), | |
| 198 | NumberSequenceKeypoint.new(.905,1.06,0), | |
| 199 | NumberSequenceKeypoint.new(.968,.938,0), | |
| 200 | NumberSequenceKeypoint.new(.984,1.13,0), | |
| 201 | NumberSequenceKeypoint.new(1,1.62,0), | |
| 202 | } | |
| 203 | local Size = NumberSequence.new(sizePoints) | |
| 204 | local Transparency = NumberSequence.new(transPoints) | |
| 205 | rayModel = Instance.new("Model",c)
| |
| 206 | efxBlock = Instance.new("Part",c)
| |
| 207 | efxBlock.BrickColor = BrickColor.new("Cyan")
| |
| 208 | efxBlock.Material = "Neon" | |
| 209 | efxBlock.FormFactor = "Custom" | |
| 210 | efxBlock.Transparency = .3 | |
| 211 | efxBlock.Size = Vector3.new(.3,.3,.3) | |
| 212 | local mesh = Instance.new("SpecialMesh",efxBlock)
| |
| 213 | mesh.MeshType = Enum.MeshType.Sphere | |
| 214 | mesh.Scale = Vector3.new(1,1,1) | |
| 215 | light = Instance.new("PointLight",c.Head)
| |
| 216 | light.Range = 10 | |
| 217 | light.Color = Color3.new(0,200/255,1) | |
| 218 | light.Shadows = false | |
| 219 | local particles = Instance.new("ParticleEmitter",efxBlock)
| |
| 220 | particles.Color = ColorSequence.new(Color3.new(0,0,225/255),Color3.new(20/255,190/255,205/255)) | |
| 221 | particles.LightEmission = .95 | |
| 222 | particles.Size = Size | |
| 223 | particles.Name = "Fire" | |
| 224 | particles.Transparency = Transparency | |
| 225 | particles.LockedToPart = true | |
| 226 | particles.VelocityInheritance = .5 | |
| 227 | particles.LockedToPart = true | |
| 228 | particles.Rate = 70 | |
| 229 | particles.Texture = "rbxassetid://56561915" | |
| 230 | particles.Lifetime = NumberRange.new(2,2) | |
| 231 | particles.RotSpeed = NumberRange.new(100,100) | |
| 232 | particles.Speed = NumberRange.new(7,7) | |
| 233 | script.Parent = efxBlock | |
| 234 | fire = particles | |
| 235 | local offset = Vector3.new(-0.11, .23, -0.5) | |
| 236 | local weld = Instance.new("Weld",c.Head)
| |
| 237 | weld.Part0 = c.Head | |
| 238 | weld.Part1 = efxBlock | |
| 239 | weld.C0 = CFrame.new(offset) * CFrame.Angles(math.rad(-40),math.rad(10),math.rad(40)) | |
| 240 | efxBlock.Parent = c | |
| 241 | local music = Instance.new("Sound",c)
| |
| 242 | music.SoundId = "rbxassetid://316012176" | |
| 243 | music.Looped = true | |
| 244 | music.Volume = 0 | |
| 245 | fight = music | |
| 246 | local music2 = Instance.new("Sound",c)
| |
| 247 | music2.SoundId = "rbxassetid://316014309" | |
| 248 | music2.Looped = true | |
| 249 | music2.Volume = 0 | |
| 250 | sans = music2 | |
| 251 | pointGyro = Instance.new("BodyGyro",c.HumanoidRootPart)
| |
| 252 | pointGyro.P = 1e7 | |
| 253 | pointGyro.D = 1e3 | |
| 254 | pointGyro.MaxTorque = Vector3.new(0,1e7,0) | |
| 255 | animator = c.Humanoid:FindFirstChild("Animator")
| |
| 256 | if animator then | |
| 257 | animator:Destroy() | |
| 258 | end | |
| 259 | c.Torso.roblox:Destroy() | |
| 260 | for i,v in pairs (c.Head:children()) do | |
| 261 | if v.ClassName == "Sound" then | |
| 262 | v:Destroy() | |
| 263 | end | |
| 264 | end | |
| 265 | for i = 1,#Joints do | |
| 266 | Joints[i].C1 = CFrame.new(Vector3.new()) | |
| 267 | end | |
| 268 | human.WalkSpeed = 0 | |
| 269 | human.JumpPower = 0 | |
| 270 | end | |
| 271 | ||
| 272 | uinps.InputBegan:connect(function(InputObject) | |
| 273 | if InputObject.KeyCode == Enum.KeyCode.K and Debounces.isTyping == false then | |
| 274 | Debounces.isPassive = not Debounces.isPassive | |
| 275 | end | |
| 276 | end) | |
| 277 | ||
| 278 | setJointCFrames = function(table) | |
| 279 | for i = 1,#table do | |
| 280 | JointTargets[i] = table[i] | |
| 281 | end | |
| 282 | AnimationCycles = 0 | |
| 283 | end | |
| 284 | ||
| 285 | setLerp = function(speed) | |
| 286 | AnimStat.lerpSpeed = speed | |
| 287 | end | |
| 288 | ||
| 289 | setTween = function(tween) | |
| 290 | AnimStat.lerpTween = tween | |
| 291 | end | |
| 292 | ||
| 293 | takeDamage = function(position,damage,distance,platformStand) | |
| 294 | for i,v in pairs (pls:children()) do | |
| 295 | if v.ClassName == "Player" and v:FindFirstChild("Character") then
| |
| 296 | local torso = v.Character:FindFirstChild("Torso")
| |
| 297 | if torso and (torso.Position - position).magnitude < distance then | |
| 298 | v.Character.Humanoid:TakeDamage(damage) | |
| 299 | if platformStand == true then | |
| 300 | v.Character.PlatformStand = platformStand | |
| 301 | end | |
| 302 | end | |
| 303 | end | |
| 304 | end | |
| 305 | end | |
| 306 | ||
| 307 | -------------------------------------------------------- | |
| 308 | ||
| 309 | prepareCharacter() | |
| 310 | ||
| 311 | -------------------------------------------------------- | |
| 312 | ||
| 313 | spawn(function() | |
| 314 | local sine = 0 | |
| 315 | while wait() do | |
| 316 | pointGyro.CFrame = CFrame.new(Vector3.new(),(mouse.Hit.p - c.HumanoidRootPart.CFrame.p).unit * 100) | |
| 317 | if Debounces.isAttacking == false and Debounces.isMoving == false and Debounces.isBoosting == false then | |
| 318 | setLerp(.1) | |
| 319 | if Debounces.isPassive == true then | |
| 320 | setJointCFrames({
| |
| 321 | CFrame.new(Vector3.new(0, -0.901 + math.sin(tick() * 1.5)/45, 0)) * CFAngles(Vector3.new(-22.001, 0, 0)); | |
| 322 | CFrame.new(Vector3.new(-0.001, 1.52 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(-10.861 + math.sin((-tick() + 2) * 1.5) * 5, 13.765, -1.658)); | |
| 323 | CFrame.new(Vector3.new(-1.5, -0.1 + math.sin(tick() * 1.5)/15, -0.801)) * CFAngles(Vector3.new(44.999, 0, 0)); | |
| 324 | CFrame.new(Vector3.new(1.7, 0.2 + math.sin(tick() * 1.5)/15, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 15)); | |
| 325 | CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.511, 3.84, 0.489)); | |
| 326 | CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, -0.001)); | |
| 327 | }) | |
| 328 | else | |
| 329 | setJointCFrames({
| |
| 330 | CFrame.new(Vector3.new(0, 0 + math.sin(tick() * 1.5)/25, 0)) * CFAngles(Vector3.new(0, 0, 0)); | |
| 331 | CFrame.new(Vector3.new(0, 1.5 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(1.554 + math.sin((-tick() + 2) * 1.5) * 5, -0.001, -0.001)); | |
| 332 | CFrame.new(Vector3.new(-1.06, -0.03 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, 0, 29.51)); | |
| 333 | CFrame.new(Vector3.new(1.059, -0.031 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, -3.842, -29.511)); | |
| 334 | CFrame.new(Vector3.new(-0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(0, 8.885, 0)); | |
| 335 | CFrame.new(Vector3.new(0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(-0.001, -8.886, 0)); | |
| 336 | }) | |
| 337 | end | |
| 338 | elseif Debounces.isAttacking == false and Debounces.isMoving == true and Debounces.isBoosting == false then | |
| 339 | sine = sine + math.rad(12) | |
| 340 | human.WalkSpeed = 15 | |
| 341 | setLerp(.15) | |
| 342 | setJointCFrames({
| |
| 343 | CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, math.sin(sine) * -2.5, 0)); | |
| 344 | CFrame.new(Vector3.new(0, 1.499, -0.04)) * CFAngles(Vector3.new(-5.676, -0.001 - math.sin(sine) * 3, -0.001)); | |
| 345 | CFrame.new(Vector3.new(-1.97, 0 + math.sin(sine + .5)/20, 0.1 + math.sin(-sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(sine) * 23, 0, 0)); | |
| 346 | CFrame.new(Vector3.new(1.97, 0 - math.sin(sine + .5)/20, 0.1 + math.sin(sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(-sine) * 23, 0, 0)); | |
| 347 | CFrame.new(Vector3.new(-0.5, -1.93 - math.cos(sine)/8.7, 0.2 + math.sin(sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(-sine) * 30, 0, 0)); | |
| 348 | CFrame.new(Vector3.new(0.5, -1.93 + math.cos(sine)/8.7, 0.2 + math.sin(-sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(sine) * 30, 0, 0)); | |
| 349 | }) | |
| 350 | end | |
| 351 | if Debounces.scalingDamage == true then | |
| 352 | takeDamage(c.HumanoidRootPart.Position,Debounces.damageLevel,8,true) | |
| 353 | end | |
| 354 | end | |
| 355 | end) | |
| 356 | ||
| 357 | human.Changed:connect(function(prop) | |
| 358 | if prop == "MoveDirection" then | |
| 359 | if human.MoveDirection.magnitude > .02 then | |
| 360 | Debounces.isMoving = true | |
| 361 | else | |
| 362 | Debounces.isMoving = false | |
| 363 | end | |
| 364 | end | |
| 365 | end) | |
| 366 | ||
| 367 | uinps.InputBegan:connect(function(InputObject) | |
| 368 | if InputObject.KeyCode == Enum.KeyCode.A and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 369 | Debounces.isBoosting = true | |
| 370 | Debounces.damageLevel = 10 | |
| 371 | Debounces.scalingDamage = true | |
| 372 | local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
| |
| 373 | setLerp(.15) | |
| 374 | setJointCFrames({
| |
| 375 | CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 20)); | |
| 376 | CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-10.372, 28.758, -1.837)); | |
| 377 | CFrame.new(Vector3.new(-0.7, -0.2, -0.801)) * CFAngles(Vector3.new(45, 0, 45)); | |
| 378 | CFrame.new(Vector3.new(1.7, 0.2, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 45)); | |
| 379 | CFrame.new(Vector3.new(-0.3, -2, 0.2)) * CFAngles(Vector3.new(-11.283, -17.801, 19.495)); | |
| 380 | CFrame.new(Vector3.new(0.9, -2, -0.201)) * CFAngles(Vector3.new(15, -15, 29.999)); | |
| 381 | }) | |
| 382 | local boostSpeed = 250 | |
| 383 | local efx = Instance.new("Sound",c.Head)
| |
| 384 | efx.SoundId = "rbxassetid://200632875" | |
| 385 | efx.Pitch = math.random(1100,1300)/1000 | |
| 386 | efx.Volume = .5 | |
| 387 | efx:Play() | |
| 388 | spawn(function() | |
| 389 | wait(5) | |
| 390 | efx:Destroy() | |
| 391 | end) | |
| 392 | vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(1,0,0)).p).unit * boostSpeed | |
| 393 | vel.P = 1e3 | |
| 394 | vel.MaxForce = Vector3.new(math.huge,0,math.huge) | |
| 395 | wait(.15) | |
| 396 | vel.P = 1000 | |
| 397 | vel.MaxForce = Vector3.new(3000,0,3000) | |
| 398 | vel.Velocity = Vector3.new() | |
| 399 | wait(.3) | |
| 400 | setLerp(.3) | |
| 401 | setJointCFrames({
| |
| 402 | CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 13)); | |
| 403 | CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-30.239, 42.47, 11.879)); | |
| 404 | CFrame.new(Vector3.new(-1.9, -0.2, -0.401)) * CFAngles(Vector3.new(44.999, 0, -45)); | |
| 405 | CFrame.new(Vector3.new(1.5, 0.4, 0.599)) * CFAngles(Vector3.new(-62.058, -21.088, -15.383)); | |
| 406 | CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.239, -26.158, -14.457)); | |
| 407 | CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(-0.505, -14.478, -18.968)); | |
| 408 | }) | |
| 409 | wait(.2) | |
| 410 | vel:Destroy() | |
| 411 | Debounces.damageLevel = 0 | |
| 412 | Debounces.scalingDamage = false | |
| 413 | Debounces.isBoosting = false | |
| 414 | end | |
| 415 | end) | |
| 416 | ||
| 417 | uinps.InputBegan:connect(function(InputObject) | |
| 418 | if InputObject.KeyCode == Enum.KeyCode.D and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 419 | Debounces.isBoosting = true | |
| 420 | Debounces.damageLevel = 10 | |
| 421 | Debounces.scalingDamage = true | |
| 422 | local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
| |
| 423 | setLerp(.15) | |
| 424 | setJointCFrames({
| |
| 425 | CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -15)); | |
| 426 | CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-13.603, -45.662, -6.645)); | |
| 427 | CFrame.new(Vector3.new(-1.9, 0, -0.201)) * CFAngles(Vector3.new(31.935, -7.436, -60.853)); | |
| 428 | CFrame.new(Vector3.new(1.9, 0, 0.399)) * CFAngles(Vector3.new(-3.644, -23.448, 59.102)); | |
| 429 | CFrame.new(Vector3.new(-1.1, -1.8, 0)) * CFAngles(Vector3.new(-3.616, -11.936, -29.566)); | |
| 430 | CFrame.new(Vector3.new(0.1, -1.6, -0.601)) * CFAngles(Vector3.new(1.943, -7.181, -32.528)); | |
| 431 | }) | |
| 432 | local boostSpeed = 250 | |
| 433 | local efx = Instance.new("Sound",c.Head)
| |
| 434 | efx.SoundId = "rbxassetid://200632875" | |
| 435 | efx.Pitch = math.random(1100,1300)/1000 | |
| 436 | efx.Volume = .5 | |
| 437 | efx:Play() | |
| 438 | spawn(function() | |
| 439 | wait(5) | |
| 440 | efx:Destroy() | |
| 441 | end) | |
| 442 | vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(-1,0,0)).p).unit * boostSpeed | |
| 443 | vel.P = 1e3 | |
| 444 | vel.MaxForce = Vector3.new(math.huge,0,math.huge) | |
| 445 | wait(.15) | |
| 446 | vel.P = 1000 | |
| 447 | vel.MaxForce = Vector3.new(3000,0,3000) | |
| 448 | vel.Velocity = Vector3.new() | |
| 449 | wait(.3) | |
| 450 | setLerp(.3) | |
| 451 | setJointCFrames({
| |
| 452 | CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -13)); | |
| 453 | CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327)); | |
| 454 | CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60)); | |
| 455 | CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342)); | |
| 456 | CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729)); | |
| 457 | CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999)); | |
| 458 | }) | |
| 459 | wait(.2) | |
| 460 | vel:Destroy() | |
| 461 | Debounces.damageLevel = 0 | |
| 462 | Debounces.scalingDamage = false | |
| 463 | Debounces.isBoosting = false | |
| 464 | end | |
| 465 | end) | |
| 466 | ||
| 467 | uinps.InputBegan:connect(function(InputObject) | |
| 468 | if InputObject.KeyCode == Enum.KeyCode.W and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 469 | Debounces.isBoosting = true | |
| 470 | Debounces.damageLevel = 10 | |
| 471 | Debounces.scalingDamage = true | |
| 472 | local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
| |
| 473 | setLerp(.15) | |
| 474 | setJointCFrames({
| |
| 475 | CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-40.001, 0, 5)); | |
| 476 | CFrame.new(Vector3.new(-0.001, 1.429, 0.2)) * CFAngles(Vector3.new(25.141, -8.347, 0.878)); | |
| 477 | CFrame.new(Vector3.new(-1.5, 0, .101)) * CFAngles(Vector3.new(14.999, -0.001, 0)); | |
| 478 | CFrame.new(Vector3.new(1.7, 0.199, -0.401)) * CFAngles(Vector3.new(28.08, -0.358, 21.087)); | |
| 479 | CFrame.new(Vector3.new(-0.5, -1.8, 0.6)) * CFAngles(Vector3.new(-29.448, 3.57, -1.5)); | |
| 480 | CFrame.new(Vector3.new(0.499, -1.6, -0.401)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968)); | |
| 481 | }) | |
| 482 | local boostSpeed = 250 | |
| 483 | local efx = Instance.new("Sound",c.Head)
| |
| 484 | efx.SoundId = "rbxassetid://200632875" | |
| 485 | efx.Pitch = math.random(1100,1300)/1000 | |
| 486 | efx.Volume = .5 | |
| 487 | efx:Play() | |
| 488 | spawn(function() | |
| 489 | wait(5) | |
| 490 | efx:Destroy() | |
| 491 | end) | |
| 492 | vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,1)).p).unit * boostSpeed | |
| 493 | vel.P = 1e3 | |
| 494 | vel.MaxForce = Vector3.new(math.huge,0,math.huge) | |
| 495 | wait(.15) | |
| 496 | vel.P = 1000 | |
| 497 | vel.MaxForce = Vector3.new(3000,0,3000) | |
| 498 | vel.Velocity = Vector3.new() | |
| 499 | wait(.3) | |
| 500 | setLerp(.3) | |
| 501 | setJointCFrames({
| |
| 502 | CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 40, -13)); | |
| 503 | CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327)); | |
| 504 | CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60)); | |
| 505 | CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342)); | |
| 506 | CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729)); | |
| 507 | CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999)); | |
| 508 | }) | |
| 509 | wait(.2) | |
| 510 | vel:Destroy() | |
| 511 | Debounces.damageLevel = 0 | |
| 512 | Debounces.scalingDamage = false | |
| 513 | Debounces.isBoosting = false | |
| 514 | end | |
| 515 | end) | |
| 516 | ||
| 517 | uinps.InputBegan:connect(function(InputObject) | |
| 518 | if InputObject.KeyCode == Enum.KeyCode.S and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 519 | Debounces.isBoosting = true | |
| 520 | Debounces.damageLevel = 10 | |
| 521 | Debounces.scalingDamage = true | |
| 522 | local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
| |
| 523 | setLerp(.15) | |
| 524 | setJointCFrames({
| |
| 525 | CFrame.new(Vector3.new(0, -.3, 0)) * CFAngles(Vector3.new(15, 0, 0)); | |
| 526 | CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-5.298, -1.305, -4.093)); | |
| 527 | CFrame.new(Vector3.new(-1.7, 0, -0.201)) * CFAngles(Vector3.new(12.112, -6.562, -16.939)); | |
| 528 | CFrame.new(Vector3.new(1.7, 0, -0.201)) * CFAngles(Vector3.new(8.817, 8.378, 20.465)); | |
| 529 | CFrame.new(Vector3.new(-0.7, -1.8, 0.2)) * CFAngles(Vector3.new(-14.432, 3.06, -2.373)); | |
| 530 | CFrame.new(Vector3.new(0.5, -1.8, -0.201)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968)); | |
| 531 | }) | |
| 532 | local boostSpeed = 150 | |
| 533 | local boostSpeed = 250 | |
| 534 | local efx = Instance.new("Sound",c.Head)
| |
| 535 | efx.SoundId = "rbxassetid://200632875" | |
| 536 | efx.Pitch = math.random(1100,1300)/1000 | |
| 537 | efx.Volume = .5 | |
| 538 | efx:Play() | |
| 539 | spawn(function() | |
| 540 | wait(5) | |
| 541 | efx:Destroy() | |
| 542 | end) | |
| 543 | vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-1)).p).unit * boostSpeed | |
| 544 | vel.P = 1e3 | |
| 545 | vel.MaxForce = Vector3.new(math.huge,0,math.huge) | |
| 546 | wait(.15) | |
| 547 | vel.P = 1000 | |
| 548 | vel.MaxForce = Vector3.new(3000,0,3000) | |
| 549 | vel.Velocity = Vector3.new() | |
| 550 | wait(.3) | |
| 551 | setLerp(.3) | |
| 552 | setJointCFrames({
| |
| 553 | CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(4, 0, 0)); | |
| 554 | CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-20.081, 28.752, 3.598)); | |
| 555 | CFrame.new(Vector3.new(-1.7, 0.2, -0.601)) * CFAngles(Vector3.new(59.51, -3.841, -14.511)); | |
| 556 | CFrame.new(Vector3.new(1.7, 0.2, 0.399)) * CFAngles(Vector3.new(-47.597, -13.104, 17.887)); | |
| 557 | CFrame.new(Vector3.new(-0.7, -1.4, 0.2)) * CFAngles(Vector3.new(-44.477, 3.836, -0.524)); | |
| 558 | CFrame.new(Vector3.new(0.5, -1.4, -0.601)) * CFAngles(Vector3.new(-15.868, -12.953, -7.631)); | |
| 559 | }) | |
| 560 | wait(.2) | |
| 561 | vel:Destroy() | |
| 562 | Debounces.damageLevel = 0 | |
| 563 | Debounces.scalingDamage = false | |
| 564 | Debounces.isBoosting = false | |
| 565 | end | |
| 566 | end) | |
| 567 | ||
| 568 | uinps.InputBegan:connect(function(InputObject) | |
| 569 | if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 570 | local isLooping = true | |
| 571 | uinps.InputEnded:connect(function(InputObject2) | |
| 572 | if InputObject2.KeyCode == Enum.KeyCode.Q then | |
| 573 | isLooping = false | |
| 574 | end | |
| 575 | end) | |
| 576 | while true do | |
| 577 | if isLooping == false then | |
| 578 | break | |
| 579 | end | |
| 580 | Debounces.attackNumber = Debounces.attackNumber + 1 | |
| 581 | local aimPos = mouse.Hit.p | |
| 582 | local head = Instance.new("Part",c)
| |
| 583 | head.Size = Vector3.new(12,.2,12) | |
| 584 | head.CanCollide = false | |
| 585 | head.Anchored = true | |
| 586 | head.Transparency = 1 | |
| 587 | for i = 1,2 do | |
| 588 | local decal = Instance.new("Decal",head)
| |
| 589 | decal.Texture = "rbxassetid://323497117" | |
| 590 | if i == 1 then | |
| 591 | decal.Face = Enum.NormalId.Top | |
| 592 | else | |
| 593 | decal.Face = Enum.NormalId.Bottom | |
| 594 | end | |
| 595 | end | |
| 596 | if Debounces.attackNumber%2 == 1 then | |
| 597 | head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos) | |
| 598 | else | |
| 599 | head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos) | |
| 600 | end | |
| 601 | spawn(function() | |
| 602 | local timer = 0 | |
| 603 | while rs.RenderStepped:wait() do | |
| 604 | if timer >= 1.55 then | |
| 605 | break | |
| 606 | end | |
| 607 | head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60))) | |
| 608 | timer = timer + 1/30/(Debounces.FPS/60) | |
| 609 | end | |
| 610 | head.CFrame = CFrame.new(head.CFrame.p,aimPos) | |
| 611 | local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999) | |
| 612 | local hit, pos = workspace:FindPartOnRay(ray,c) | |
| 613 | local dis = (head.CFrame.p - pos).magnitude | |
| 614 | local rayPart = Instance.new("Part",rayModel)
| |
| 615 | rayPart.Material = "Neon" | |
| 616 | rayPart.FormFactor = "Custom" | |
| 617 | rayPart.BrickColor = BrickColor.new(1,1,1) | |
| 618 | rayPart.Anchored = true | |
| 619 | rayPart.CanCollide = false | |
| 620 | rayPart.Size = Vector3.new(7,7,dis + 400) | |
| 621 | local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2) | |
| 622 | rayPart.CFrame = rayCFrame | |
| 623 | head:Destroy() | |
| 624 | end) | |
| 625 | wait() | |
| 626 | local s = Instance.new("Sound",head)
| |
| 627 | s.Volume = 1 | |
| 628 | s.SoundId = "rbxassetid://332223043" | |
| 629 | s:Play() | |
| 630 | wait(.04) | |
| 631 | end | |
| 632 | end | |
| 633 | end) | |
| 634 | ||
| 635 | uinps.InputBegan:connect(function(InputObj) | |
| 636 | if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 637 | Debounces.isAttacking = true | |
| 638 | local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p | |
| 639 | local head = Instance.new("Part",c)
| |
| 640 | head.Size = Vector3.new(18,.2,18) | |
| 641 | head.CanCollide = false | |
| 642 | head.Anchored = true | |
| 643 | head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos) | |
| 644 | head.Transparency = 1 | |
| 645 | for i = 1,2 do | |
| 646 | local decal = Instance.new("Decal",head)
| |
| 647 | decal.Texture = "rbxassetid://323497117" | |
| 648 | if i == 1 then | |
| 649 | decal.Face = Enum.NormalId.Top | |
| 650 | else | |
| 651 | decal.Face = Enum.NormalId.Bottom | |
| 652 | end | |
| 653 | end | |
| 654 | setLerp(.1) | |
| 655 | setJointCFrames({
| |
| 656 | CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0)); | |
| 657 | CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001)); | |
| 658 | CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502)); | |
| 659 | CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928)); | |
| 660 | CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001)); | |
| 661 | CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0)); | |
| 662 | }) | |
| 663 | spawn(function() | |
| 664 | local timer = 0 | |
| 665 | while rs.RenderStepped:wait() do | |
| 666 | if timer >= 1.55/.8 then | |
| 667 | break | |
| 668 | end | |
| 669 | head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60))) | |
| 670 | timer = timer + 1/30/(Debounces.FPS/60) | |
| 671 | end | |
| 672 | head.CFrame = CFrame.new(head.CFrame.p,aimPos) | |
| 673 | local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999) | |
| 674 | local hit, pos = workspace:FindPartOnRay(ray,c) | |
| 675 | local dis = (head.CFrame.p - pos).magnitude | |
| 676 | local rayPart = Instance.new("Part",rayModel)
| |
| 677 | rayPart.Material = "Neon" | |
| 678 | rayPart.FormFactor = "Custom" | |
| 679 | rayPart.Name = "Punch" | |
| 680 | rayPart.BrickColor = BrickColor.new(1,1,1) | |
| 681 | rayPart.Anchored = true | |
| 682 | rayPart.CanCollide = false | |
| 683 | rayPart.Size = Vector3.new(28,28,dis + 400) | |
| 684 | local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2) | |
| 685 | rayPart.CFrame = rayCFrame | |
| 686 | head:Destroy() | |
| 687 | end) | |
| 688 | wait() | |
| 689 | local s = Instance.new("Sound",head)
| |
| 690 | s.Volume = 1 | |
| 691 | s.SoundId = "rbxassetid://332223043" | |
| 692 | s.Pitch = .8 | |
| 693 | s:Play() | |
| 694 | wait(.75) | |
| 695 | setLerp(.17) | |
| 696 | setJointCFrames({
| |
| 697 | CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0)); | |
| 698 | CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001)); | |
| 699 | CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76)); | |
| 700 | CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155)); | |
| 701 | CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001)); | |
| 702 | CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0)); | |
| 703 | }) | |
| 704 | wait(.5) | |
| 705 | Debounces.isAttacking = false | |
| 706 | end | |
| 707 | end) | |
| 708 | ||
| 709 | reflect = function(d,n) | |
| 710 | local i, n = -1 * d.unit, n.unit | |
| 711 | local dot = n:Dot(i) | |
| 712 | return 2*dot*n - i | |
| 713 | end | |
| 714 | ||
| 715 | makeReflectionBeam = function(pos,look,isCrit) | |
| 716 | local ray = Ray.new(pos,look) | |
| 717 | local hit,hitpos,norm = workspace:FindPartOnRay(ray,c) | |
| 718 | local e = Instance.new("Part",rayModel)
| |
| 719 | e.Anchored = true | |
| 720 | e.CanCollide = false | |
| 721 | e.BrickColor = BrickColor.new("White")
| |
| 722 | e.Material = "Neon" | |
| 723 | e.FormFactor = "Custom" | |
| 724 | e.Size = Vector3.new(6,6,(pos - hitpos).magnitude) | |
| 725 | if isCrit == true then | |
| 726 | e.Size = Vector3.new(16,16,(pos - hitpos).magnitude) | |
| 727 | e.Name = "Punch" | |
| 728 | end | |
| 729 | e.CFrame = CFrame.new(pos + (hitpos - pos)/2, pos) | |
| 730 | local e = Instance.new("Sound",c)
| |
| 731 | if isCrit == true then | |
| 732 | e.Volume = .5 | |
| 733 | else | |
| 734 | e.Volume = .3 | |
| 735 | e.Pitch = 1.5 | |
| 736 | end | |
| 737 | e.SoundId = "rbxassetid://200632875" | |
| 738 | e:Play() | |
| 739 | spawn(function() | |
| 740 | wait(6) | |
| 741 | e:Destroy() | |
| 742 | end) | |
| 743 | wait(.05) | |
| 744 | if hit ~= nil then | |
| 745 | newDir = reflect(look.unit,norm,isCrit) | |
| 746 | makeReflectionBeam(hitpos,newDir * 999,isCrit) | |
| 747 | end | |
| 748 | end | |
| 749 | ||
| 750 | uinps.InputBegan:connect(function(InputObject) | |
| 751 | if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 752 | local isLooping = true | |
| 753 | uinps.InputEnded:connect(function(InputObject2) | |
| 754 | if InputObject2.KeyCode == Enum.KeyCode.Q then | |
| 755 | isLooping = false | |
| 756 | end | |
| 757 | end) | |
| 758 | while true do | |
| 759 | if isLooping == false then | |
| 760 | break | |
| 761 | end | |
| 762 | Debounces.attackNumber = Debounces.attackNumber + 1 | |
| 763 | local aimPos = mouse.Hit.p | |
| 764 | local head = Instance.new("Part",c)
| |
| 765 | head.Size = Vector3.new(12,.2,12) | |
| 766 | head.CanCollide = false | |
| 767 | head.Anchored = true | |
| 768 | head.Transparency = 1 | |
| 769 | for i = 1,2 do | |
| 770 | local decal = Instance.new("Decal",head)
| |
| 771 | decal.Texture = "rbxassetid://323497117" | |
| 772 | if i == 1 then | |
| 773 | decal.Face = Enum.NormalId.Top | |
| 774 | else | |
| 775 | decal.Face = Enum.NormalId.Bottom | |
| 776 | end | |
| 777 | end | |
| 778 | if Debounces.attackNumber%2 == 1 then | |
| 779 | head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos) | |
| 780 | else | |
| 781 | head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos) | |
| 782 | end | |
| 783 | spawn(function() | |
| 784 | local timer = 0 | |
| 785 | while rs.RenderStepped:wait() do | |
| 786 | if timer >= 1.55 then | |
| 787 | break | |
| 788 | end | |
| 789 | head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60))) | |
| 790 | timer = timer + 1/30/(Debounces.FPS/60) | |
| 791 | end | |
| 792 | head.CFrame = CFrame.new(head.CFrame.p,aimPos) | |
| 793 | head:Destroy() | |
| 794 | makeReflectionBeam(head.CFrame.p,(head.CFrame.p - aimPos).unit * -999,false) | |
| 795 | end) | |
| 796 | ||
| 797 | wait() | |
| 798 | local s = Instance.new("Sound",head)
| |
| 799 | s.Volume = 1 | |
| 800 | s.SoundId = "rbxassetid://332223043" | |
| 801 | s.Pitch = 1.02 | |
| 802 | s:Play() | |
| 803 | wait(.2) | |
| 804 | end | |
| 805 | end | |
| 806 | end) | |
| 807 | ||
| 808 | uinps.InputBegan:connect(function(InputObj) | |
| 809 | if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then | |
| 810 | Debounces.isAttacking = true | |
| 811 | local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p | |
| 812 | local head = Instance.new("Part",c)
| |
| 813 | head.Size = Vector3.new(18,.2,18) | |
| 814 | head.CanCollide = false | |
| 815 | head.Anchored = true | |
| 816 | head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos) | |
| 817 | head.Transparency = 1 | |
| 818 | for i = 1,2 do | |
| 819 | local decal = Instance.new("Decal",head)
| |
| 820 | decal.Texture = "rbxassetid://323497117" | |
| 821 | if i == 1 then | |
| 822 | decal.Face = Enum.NormalId.Top | |
| 823 | else | |
| 824 | decal.Face = Enum.NormalId.Bottom | |
| 825 | end | |
| 826 | end | |
| 827 | setLerp(.1) | |
| 828 | setJointCFrames({
| |
| 829 | CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0)); | |
| 830 | CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001)); | |
| 831 | CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502)); | |
| 832 | CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928)); | |
| 833 | CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001)); | |
| 834 | CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0)); | |
| 835 | }) | |
| 836 | spawn(function() | |
| 837 | local timer = 0 | |
| 838 | while rs.RenderStepped:wait() do | |
| 839 | if timer >= 1.55/.8 then | |
| 840 | break | |
| 841 | end | |
| 842 | head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60))) | |
| 843 | timer = timer + 1/30/(Debounces.FPS/60) | |
| 844 | end | |
| 845 | head.CFrame = CFrame.new(head.CFrame.p,aimPos) | |
| 846 | head:Destroy() | |
| 847 | makeReflectionBeam(head.CFrame.p,(head.CFrame.p - aimPos).unit * -999,true) | |
| 848 | end) | |
| 849 | wait() | |
| 850 | local s = Instance.new("Sound",head)
| |
| 851 | s.Volume = 2 | |
| 852 | s.SoundId = "rbxassetid://332223043" | |
| 853 | s.Pitch = .8 | |
| 854 | s:Play() | |
| 855 | wait(.75) | |
| 856 | setLerp(.17) | |
| 857 | setJointCFrames({
| |
| 858 | CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0)); | |
| 859 | CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001)); | |
| 860 | CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76)); | |
| 861 | CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155)); | |
| 862 | CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001)); | |
| 863 | CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0)); | |
| 864 | }) | |
| 865 | wait(.5) | |
| 866 | Debounces.isAttacking = false | |
| 867 | end | |
| 868 | end) | |
| 869 | ||
| 870 | uinps.InputBegan:connect(function(InputObj) | |
| 871 | if InputObj.KeyCode == Enum.KeyCode.Slash then | |
| 872 | local finishEvent = nil | |
| 873 | Debounces.isTyping = true | |
| 874 | finishEvent = uinps.InputBegan:connect(function(InputObj) | |
| 875 | if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 876 | Debounces.isTyping = false | |
| 877 | finishEvent:disconnect() | |
| 878 | end | |
| 879 | end) | |
| 880 | end | |
| 881 | end) | |
| 882 | ||
| 883 | uinps.InputBegan:connect(function(InputObj) | |
| 884 | if InputObj.KeyCode == Enum.KeyCode.LeftShift then | |
| 885 | Debounces.isSprinting = true | |
| 886 | end | |
| 887 | end) | |
| 888 | ||
| 889 | uinps.InputEnded:connect(function(InputObj) | |
| 890 | if InputObj.KeyCode == Enum.KeyCode.LeftShift then | |
| 891 | Debounces.isSprinting = false | |
| 892 | end | |
| 893 | end) | |
| 894 | ||
| 895 | rs.RenderStepped:connect(function() | |
| 896 | Debounces.FPS = 1/rs.RenderStepped:wait() | |
| 897 | local FPSLerp = AnimStat.lerpSpeed/(Debounces.FPS/60) | |
| 898 | if Debounces.isPassive == false then | |
| 899 | fire.Enabled = false | |
| 900 | light.Range = 0 | |
| 901 | fight:Pause() | |
| 902 | sans:Resume() | |
| 903 | efxBlock.Transparency = 1 | |
| 904 | else | |
| 905 | fire.Enabled = true | |
| 906 | light.Range = 10 | |
| 907 | fight:Resume() | |
| 908 | sans:Pause() | |
| 909 | efxBlock.Transparency = 0 | |
| 910 | end | |
| 911 | for i,v in pairs (rayModel:children()) do | |
| 912 | if v.Transparency >= 1 then | |
| 913 | v:Destroy() | |
| 914 | else | |
| 915 | v.CanCollide = true | |
| 916 | local parts = v:GetTouchingParts() | |
| 917 | v.CanCollide = false | |
| 918 | for i = 1,#parts do | |
| 919 | if parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name ~= "Punch" then
| |
| 920 | parts[i].Parent.Humanoid:TakeDamage(.5/(Debounces.FPS/60)) | |
| 921 | elseif parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name == "Punch" then
| |
| 922 | parts[i].Parent.Humanoid:TakeDamage(3.1/(Debounces.FPS/60)) | |
| 923 | end | |
| 924 | end | |
| 925 | v.Size = v.Size + Vector3.new(1/(Debounces.FPS/60),1/(Debounces.FPS/60),0) | |
| 926 | v.Transparency = v.Transparency + .05/(Debounces.FPS/60) | |
| 927 | end | |
| 928 | end | |
| 929 | for i = 1,#Joints do | |
| 930 | Joints[i].C0 = Joints[i].C0:lerp(JointTargets[i], FPSLerp) | |
| 931 | end | |
| 932 | local sineval = math.sin(tick() * 2) * 3 | |
| 933 | fire.Acceleration = Vector3.new(sineval,1,sineval) | |
| 934 | light.Brightness = math.sin(math.cos(tick() * 2) * 1.5) | |
| 935 | end) |