local plr = game:GetService("Players").LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait() local humanoid = char:WaitForChild("Humanoid") local rootPart = char:WaitForChild("HumanoidRootPart") local tool = Instance.new("Tool") tool.RequiresHandle = false tool.Parent = plr.Backpack tool.Name = "Dodge" tool.CanBeDropped = false local DODGE_POWER = 200 local DODGE_DURATION = 0.25 local COOLDOWN = 0.5 local canDodge = true local function createDodgeEffect() local dodgeGui = Instance.new("BillboardGui") dodgeGui.Size = UDim2.new(4, 0, 4, 0) dodgeGui.AlwaysOnTop = true dodgeGui.StudsOffset = Vector3.new(0, 2, 0) local image = Instance.new("ImageLabel") image.Size = UDim2.new(1, 0, 1, 0) image.Image = "rbxassetid://13353257846" image.BackgroundTransparency = 1 image.Parent = dodgeGui dodgeGui.Parent = rootPart local startTime = os.clock() local duration = 0.8 coroutine.wrap(function() while os.clock() - startTime < duration do local progress = (os.clock() - startTime) / duration image.ImageTransparency = progress dodgeGui.StudsOffset = Vector3.new(0, 2 + (progress * 2), 0) task.wait() end dodgeGui:Destroy() end)() end local function MovePlayerToLeft() if not canDodge or not humanoid or humanoid.Health <= 0 or not rootPart then return end canDodge = false local lookVector = rootPart.CFrame.LookVector lookVector = Vector3.new(lookVector.X, 0, lookVector.Z).Unit local leftVector = Vector3.new(-lookVector.Z, 0, lookVector.X) local currentVelocity = rootPart.AssemblyLinearVelocity rootPart.AssemblyLinearVelocity = Vector3.new( currentVelocity.X + (leftVector.X * DODGE_POWER), currentVelocity.Y, currentVelocity.Z + (leftVector.Z * DODGE_POWER) ) createDodgeEffect() task.delay(COOLDOWN, function() canDodge = true end) end tool.Activated:Connect(MovePlayerToLeft) plr.CharacterAdded:Connect(function(newChar) char = newChar humanoid = newChar:WaitForChild("Humanoid") rootPart = newChar:WaitForChild("HumanoidRootPart") end)