"local module = {}
local PlayerTable = _G.PlayerTable
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Root = Character:WaitForChild("HumanoidRootPart")
local Status_Folder = Character:WaitForChild("Status")
local Info = Character:WaitForChild("Info")
local CharacterEvent = Character[".Manager_Script"].CharacterEvent
local ADVANCED_MOVEMENT = script.Parent
local UserInputService = game:GetService("UserInputService")
local rotations = {
["w"] = 0,
["a"] = 90,
["s"] = 180,
["d"] = -90,
}
return function(key)
if Status_Folder:FindFirstChild("Ragdolled") and not Status_Folder:FindFirstChild("Knocked") then
CharacterEvent:FireServer("RagdollCancel")
return
end
if _G.DashCheck() then
return
end
if PlayerTable["Game Variables"].DashCD then
return
end
if PlayerTable["Game Variables"].Dashes <= 0 then
return
end
if not PlayerTable["Game Variables"].CanDash then
return
end
for i,v in pairs(Root:GetChildren()) do
if v:IsA("BodyVelocity") then
v:Destroy()
end
end
PlayerTable["Game Variables"].DashCD = true
--[[spawn(function()
repeat wait() until Humanoid.FloorMaterial ~= Enum.Material.Air or Humanoid:GetState() ~= (Enum.HumanoidStateType.Freefall or Enum.HumanoidStateType.Jumping) or Character:FindFirstChild("Torso"):FindFirstChild("BodyPosition")
PlayerTable["Game Variables"].CanDash = true
end)]]
local airdash = false
if Humanoid:GetState() == (Enum.HumanoidStateType.Freefall or Enum.HumanoidStateType.Jumping) and key == "w" and UserInputService:IsKeyDown(Enum.KeyCode.Q) and not Character:FindFirstChild("Torso"):FindFirstChild("BodyPosition") then
airdash = true
end
local WindStep = false
task.spawn(function()
if table.find(game.ReplicatedStorage.RS_Package.Remotes.GetStat:InvokeServer("Talents"), "Wind Step") then
WindStep = true
end
end)
if airdash then
PlayerTable["Game Variables"].Dashes = 0
else
PlayerTable["Game Variables"].Dashes -= 1
end
PlayerTable["Game Variables"].DCount += 1
if PlayerTable["Game Variables"].DCount > 2 then
PlayerTable["Game Variables"].DCount = 1
end
--PlayerTable["Game Variables"].CanDash = false
PlayerTable["Game Variables"].LAST_DASH = tick()
task.delay(2.5, function()
if PlayerTable["Game Variables"].Dashes > 0 then
if 2.5 <= tick() - PlayerTable["Game Variables"].LAST_DASH then
PlayerTable["Game Variables"].Dashes = 3
-- PlayerTable["Game Variables"].DCount = 0
end
end
end)
local dashing = true
PlayerTable["Game Variables"].Dashing = true
local cf
local check
if airdash then
local Mouse = LocalPlayer:GetMouse()
PlayerTable.Animations.AirDash:Play()
PlayerTable.Animations.AirDash:AdjustSpeed(1.85)
Root["AirDashSpin"]:Play()
local vel = Instance.new("BodyVelocity")
vel.MaxForce = Vector3.new(100000,100000,100000)
vel.Parent = Root
vel.Velocity = Mouse.Origin.LookVector * 2
spawn(_G.TrailEnabler)
local Conn: RBXScriptConnection?
Conn = PlayerTable.Animations.AirDash.KeyframeReached:Connect(function(kf)
if kf == "Dash" then
spawn(_G.TrailEnabler)
PlayerTable.Animations.AirDash:AdjustSpeed(1)
CharacterEvent:FireServer("Dash",{type = 'AirDash'})
vel.Velocity = Mouse.Origin.LookVector * 60
game.Debris:AddItem(vel,.35) --.45
Conn:Disconnect()
Conn = nil
end
end)
PlayerTable.Animations.AirDash.Stopped:Wait()
if vel then
vel:Destroy()
end
PlayerTable["Game Variables"].Dashing = false
task.wait(.33)
PlayerTable["Game Variables"].DashCD = false
else
local bvel = Instance.new("BodyVelocity")
bvel.Name = "Dash"
if not Status_Folder:FindFirstChild("TutorialFreeze") then
bvel.Parent = Root
end
bvel.MaxForce = Vector3.new(100000,0,100000)
local e
local dashtime = 0.29
spawn(function()
wait(dashtime)
dashing = false
PlayerTable["Game Variables"].Dashing = false
bvel:Destroy()
check:Disconnect()
e:Disconnect()
wait(0.08)
PlayerTable["Game Variables"].DashCD = false
end)
e = Root.ChildAdded:connect(function(c)
if c:IsA("BodyVelocity") then
bvel:Destroy()
dashing = false
PlayerTable["Game Variables"].Dashing = false
check:Disconnect()
wait(0.08)
PlayerTable["Game Variables"].DashCD = false
end
end)
if PlayerTable["Game Variables"].Dashes > 0 then
CharacterEvent:FireServer("Dash", {type = "Reg", frame = true, dir = key})
else
CharacterEvent:FireServer("Dash", {type = "Reg"})
end
local anim
if key == "w" then
anim = PlayerTable.Animations["DashForward"..1]
anim:Play()
if PlayerTable["Game Variables"].DCount == 1 then
anim:AdjustSpeed(0.8)
end
elseif key == "s" then
anim = PlayerTable.Animations["DashBack"..1]
anim:Play()
elseif key == "a" then
anim = PlayerTable.Animations["DashLeft"..PlayerTable["Game Variables"].DCount]
anim:Play()
elseif key == "d" then
anim = PlayerTable.Animations["DashRight"..PlayerTable["Game Variables"].DCount]
anim:Play()
end
local Base = 40
if WindStep then
Base = Base + Base * 0.2
end
local stepp = Base --[[37]] - (-PlayerTable["Game Variables"].Dashes * 8)
local currentCamera = workspace.CurrentCamera
local angle = CFrame.Angles(0, math.rad(rotations[key]), 0)
local dashtick = tick()
local doubledash = false
check = game["Run Service"].RenderStepped:connect(function()
if _G.DashCheck() or dashing == false or PlayerTable["Game Variables"].PressedM2 then
anim:Stop()
check:Disconnect()
bvel:Destroy()
dashing = false
if PlayerTable["Game Variables"].PressedM2 then
if key == "a" then
PlayerTable.Animations.LDodgeCancel:Play()
elseif key == "d" then
PlayerTable.Animations.RDodgeCancel:Play()
elseif key == "s" then
PlayerTable.Animations.SDodgeCancel:Play()
elseif key == "w" then
PlayerTable.Animations.WDodgeCancel:Play()
end
CharacterEvent:FireServer("Dash",{type = 'RollCancel'})
end
end
local lookVector = currentCamera.CFrame.LookVector * Vector3.new(1, 0, 1)
local cframe = CFrame.new(Root.Position, Root.Position + lookVector)
Root.CFrame = cframe
if key == "w" then
if Status_Folder:FindFirstChild("AerialCombo") and Status_Folder:FindFirstChild("AerialCombo").Value then
local target = Status_Folder:FindFirstChild("AerialCombo").Value
cf = target.HumanoidRootPart.CFrame
else
cf = Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5)
end
local ray = Ray.new(Character.HumanoidRootPart.CFrame.p, Character.HumanoidRootPart.CFrame.lookVector * 3)
local ignore = {game.Workspace.LivingThings,game.Workspace.Effects}
local hit = workspace:FindPartOnRayWithIgnoreList(ray,ignore)
if hit then
bvel.MaxForce = Vector3.new(10000,0,10000)
end
elseif key == "s" then
cf = Character.HumanoidRootPart.CFrame * CFrame.new(0,0,5)
local ray = Ray.new(Character.HumanoidRootPart.CFrame.p, Character.HumanoidRootPart.CFrame.lookVector * -3)
local ignore = {game.Workspace.LivingThings,game.Workspace.Effects}
local hit = workspace:FindPartOnRayWithIgnoreList(ray,ignore)
if hit then
bvel.MaxForce = Vector3.new(10000,0,10000)
end
elseif key == "a" then
cf = Character.HumanoidRootPart.CFrame * CFrame.new(-5,0,0)
local ray = Ray.new(Character.HumanoidRootPart.CFrame.p, Character.HumanoidRootPart.CFrame.rightVector * -3)
local ignore = {game.Workspace.LivingThings,game.Workspace.Effects}
local hit = workspace:FindPartOnRayWithIgnoreList(ray,ignore)
if hit then
bvel.MaxForce = Vector3.new(10000,0,10000)
end
elseif key == "d" then
cf = Character.HumanoidRootPart.CFrame * CFrame.new(5,0,0)
local ray = Ray.new(Character.HumanoidRootPart.CFrame.p, Character.HumanoidRootPart.CFrame.rightVector * 3)
local ignore = {game.Workspace.LivingThings,game.Workspace.Effects}
local hit = workspace:FindPartOnRayWithIgnoreList(ray,ignore)
if hit then
bvel.MaxForce = Vector3.new(10000,0,10000)
end
end
if not Status_Folder:FindFirstChild("TutorialFreeze") then
bvel.Velocity = CFrame.new(Character.HumanoidRootPart.Position, cf.Position).lookVector * stepp
end
end)
end
if PlayerTable["Game Variables"].Dashes <= 0 then
delay(2.1, function()
if 2 <= tick() - PlayerTable["Game Variables"].LAST_DASH then
PlayerTable["Game Variables"].Dashes = 3
-- PlayerTable["Game Variables"].CanDash = true
end
end)
end
end
" in this script, copy me the Invicible function where you can't be hit to this script "local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StunFolderCheck = require(ReplicatedStorage.RS_Package.Modules.StunFolderCheck)
function create(nam, tim, par) : Folder?
local f = Instance.new("Folder")
f.Name = nam
f.Parent = par
if tim then
task.delay(tim, function()
if f.Parent then
f:Destroy()
end
end)
end
return f
end
return function(Char : Model?,Args:{boolean?})
if StunFolderCheck.ActionCheck(Char) then return end
local LocalPlayer = Players.LocalPlayer
local Player = Players:GetPlayerFromCharacter(Char)
local Humanoid : Humanoid? = Char:FindFirstChild("Humanoid")
local Root : BasePart? = Char:FindFirstChild("HumanoidRootPart")
local Status_Folder = Char["Status"]
if not Args[1] and LocalPlayer == Player then return end
local InvisObjects = {}
local PrevTransparencies = {}
for _,Object in Char:GetDescendants() do
if Object:IsA("BasePart") and Object.Transparency == 0 then
InvisObjects[Object] = Object
Object.Transparency = 1
task.delay(0.8,function()
Object.Transparency = 0
end)
end
if Object:IsA("Decal") and Object.Transparency == 0 then
InvisObjects[Object] = Object
Object.Transparency = 1
task.delay(0.8,function()
Object.Transparency = 0
end)
end
--[[if Object:IsA("ParticleEmitter") and Object.Enabled then
InvisObjects[Object] = Object
Object.Enabled = false
task.delay(0.8,function()
if Object then
Object.Enabled = true
end
end)
end]]
end
local TrailStep = script.FX.TrailStep:Clone()
TrailStep.Parent = Root
task.delay(1.5,TrailStep.Destroy,TrailStep)
local FlashStep = script.FX.FlashStep:Clone()
FlashStep.Parent = Root
for _,FX in FlashStep:GetDescendants() do
if FX:IsA("ParticleEmitter") then task.delay(FX:GetAttribute("EmitDelay"),function() FX:Emit(FX.Name) end) end
end
task.delay(1.5,FlashStep.Destroy,FlashStep)
local SFX = script.Dash:Clone() SFX.Pitch = math.random(9,11)/10 SFX.Parent = Root SFX:Play() task.delay(SFX.TimeLength,SFX.Destroy,SFX)
local StartTime = os.clock()
local EmitTime = os.clock()
local WalkSpeed = Humanoid.WalkSpeed
Char:SetAttribute("Flash", true)
create("DodgeFrames", 0.5, Status_Folder)
repeat
Humanoid.WalkSpeed = 80
if os.clock() - EmitTime > 0.1 then
EmitTime = os.clock()
for _,FX in TrailStep:GetChildren() do
if FX:IsA("ParticleEmitter") then task.delay(FX:GetAttribute("EmitDelay"),function() FX:Emit(FX.Name) end) end
end
end
task.wait()
until os.clock() - StartTime > 0.3 or StunFolderCheck.ActionCheck(Char)
Char:SetAttribute("Flash", nil)
for _,Object in InvisObjects do
if Object:IsA("BasePart") then
Object.Transparency = 0
end
end
--[[for _,BodyPart in Char:GetChildren() do
if BodyPart.Name == "Right Arm" or BodyPart.Name == "Left Arm" or BodyPart.Name == "Right Leg" or BodyPart.Name == "Left Leg" or BodyPart.Name == "Torso" or BodyPart.Name == "Head" then
BodyPart.Transparency = 0
end
end]]
local FlashStep = script.FX.FlashStep:Clone()
FlashStep.Parent = Root
for _,FX in FlashStep:GetDescendants() do
if FX:IsA("ParticleEmitter") then task.delay(FX:GetAttribute("EmitDelay"),function() FX:Emit(FX.Name) end) end
end
task.delay(1.5,FlashStep.Destroy,FlashStep)
local SFX = script.Dash:Clone() SFX.Pitch = math.random(9,11)/10 SFX.Parent = Root SFX:Play() task.delay(SFX.TimeLength,SFX.Destroy,SFX)
end
"