
Key RequiredUniversal

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local COOLDOWN = 1.2
local canDash = true
local function setup(character)
local root = character:WaitForChild("HumanoidRootPart")
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = player:WaitForChild("PlayerGui")
local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 90, 0, 90)
button.Position = UDim2.new(0.5, -45, 0.5, -45)
button.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
button.BackgroundTransparency = 0.25
button.TextColor3 = Color3.fromRGB(255, 255, 255)
button.Text = "Upwards Dash"
button.Font = Enum.Font.GothamBold
button.TextSize = 10
button.BorderSizePixel = 0
button.Parent = screenGui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(1, 0)
corner.Parent = button
local stroke = Instance.new("UIStroke")
stroke.Thickness = 1
stroke.Transparency = 0.6
stroke.Color = Color3.fromRGB(255, 255, 255)
stroke.Parent = button
local function setCooldownVisual(timeLeft)
button.AutoButtonColor = false
button.BackgroundTransparency = 0.6
button.Text = string.format("%.1f", timeLeft)
while timeLeft > 0 do
button.Text = string.format("%.1f", timeLeft)
task.wait(0.1)
timeLeft -= 0.1
end
button.Text = "Upwards Dash"
button.BackgroundTransparency = 0.25
button.AutoButtonColor = true
end
button.MouseButton1Click:Connect(function()
if not canDash then return end
canDash = false
local look = camera.CFrame.LookVector
local flatLook = Vector3.new(look.X, 0, look.Z)
if flatLook.Magnitude > 0 then
root.CFrame = CFrame.new(root.Position, root.Position + flatLook)
end
local dashPower = 200
root.AssemblyLinearVelocity = Vector3.new(
look.X * dashPower,
50,
look.Z * dashPower
)
task.spawn(setCooldownVisual, COOLDOWN)
task.delay(COOLDOWN, function()
canDash = true
end)
end)
-- drag system
local dragging = false
local dragInput
local dragStart
local startPos
local function update(input)
local delta = input.Position - dragStart
button.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
button.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = button.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
button.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and input == dragInput then
update(input)
end
end)
end
if player.Character then
setup(player.Character)
end
player.CharacterAdded:Connect(setup)



W this is what i was looking for the best script