Back to Scripts
R6 dash and s-jump

R6 dash and s-jump

ScriptBlox
Universal Free

Game: Universal Script 📌

111 Views
1 Likes
1 Dislikes
Noobscripter342

Noobscripter342

offline

Features

For developers, this is the basics of scripting; I repeat, your program must have anti cheat bypass That's excellent because we haven't implemented this system yet, so the program we recommend is a well-known one.

Script Code

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local hrp = character:WaitForChild("HumanoidRootPart")
local camera = workspace.CurrentCamera

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://46196309"
local loadedAnim = humanoid:LoadAnimation(animation)

local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://2428506580"
sound.Volume = 1
sound.Parent = hrp

local debris = game:GetService("Debris")
local runService = game:GetService("RunService")
local uis = game:GetService("UserInputService")

-- Stats & Config (Updated per your request)
local maxStamina = 500
local currentStamina = 500
local dashStaminaCost = 120
local jumpStaminaCost = 250
local regenRate = 3 -- 1 per second as requested

local dashCooldownTime = 8
local jumpCooldownTime = 15
local dashDuration = 0.45

local isDashing = false
local isJumping = false
local dashOnCooldown = false
local jumpOnCooldown = false

-- UI Setup
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ActionGui"
screenGui.Parent = player:WaitForChild("PlayerGui")
screenGui.ResetOnSpawn = false

-- Stamina Bar Background
local staminaback = Instance.new("Frame")
staminaback.Size = UDim2.new(0, 250, 0, 25) -- Bigger for numbers
staminaback.Position = UDim2.new(0.5, -125, 0.9, 0)
staminaback.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
staminaback.Parent = screenGui
Instance.new("UICorner", staminaback).CornerRadius = UDim.new(0, 5)

-- Stamina Bar Fill
local staminaFill = Instance.new("Frame")
staminaFill.Size = UDim2.new(1, 0, 1, 0)
staminaFill.BackgroundColor3 = Color3.fromRGB(255, 200, 0)
staminaFill.BorderSizePixel = 0
staminaFill.Parent = staminaback
Instance.new("UICorner", staminaFill).CornerRadius = UDim.new(0, 5)

-- Stamina Text (The numbers you wanted)
local staminaLabel = Instance.new("TextLabel")
staminaLabel.Size = UDim2.new(1, 0, 1, 0)
staminaLabel.BackgroundTransparency = 1
staminaLabel.Text = math.floor(currentStamina) .. " / " .. maxStamina
staminaLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
staminaLabel.Font = Enum.Font.GothamBold
staminaLabel.TextSize = 14
staminaLabel.ZIndex = 3
staminaLabel.Parent = staminaback

-- Dash Button
local dashButton = Instance.new("TextButton")
dashButton.Size = UDim2.new(0, 80, 0, 80)
dashButton.Position = UDim2.new(0.85, -40, 0.85, -120)
dashButton.Text = "DASH"
dashButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
dashButton.TextColor3 = Color3.fromRGB(255, 255, 255)
dashButton.TextScaled = true
dashButton.Parent = screenGui
Instance.new("UICorner", dashButton).CornerRadius = UDim.new(1, 0)

-- S-Jump Button
local jumpButton = Instance.new("TextButton")
jumpButton.Size = UDim2.new(0, 80, 0, 80)
jumpButton.Position = UDim2.new(0.85, -130, 0.85, -120)
jumpButton.Text = "S-JUMP"
jumpButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
jumpButton.TextColor3 = Color3.fromRGB(255, 255, 255)
jumpButton.TextScaled = true
jumpButton.Parent = screenGui
Instance.new("UICorner", jumpButton).CornerRadius = UDim.new(1, 0)

local function createDust()
    for _, legName in pairs({"LeftFoot", "RightFoot", "LeftLeg", "RightLeg"}) do
        local leg = character:FindFirstChild(legName)
        if leg then
            local attachment = Instance.new("Attachment", leg)
            local dust = Instance.new("ParticleEmitter")
            dust.Texture = "rbxassetid://241837157"
            dust.Rate = 500
            dust.Lifetime = NumberRange.new(0.2)
            dust.Speed = NumberRange.new(10, 15)
            dust.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
            dust.Parent = attachment
            debris:AddItem(attachment, 0.2)
        end
    end
end

local function executeDash()
    if not isDashing and not dashOnCooldown and currentStamina >= dashStaminaCost and humanoid.Health > 0 then
        isDashing = true
        dashOnCooldown = true
        currentStamina = currentStamina - dashStaminaCost
        dashButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
        
        sound:Play()
        loadedAnim:Play()

        local bv = Instance.new("BodyVelocity")
        bv.MaxForce = Vector3.new(1e5, 0, 1e5)
        local dir = Vector3.new(camera.CFrame.LookVector.X, 0, camera.CFrame.LookVector.Z).Unit
        bv.Velocity = dir * 65
        bv.Parent = hrp
        
        createDust()
        task.wait(dashDuration)
        bv:Destroy()
        loadedAnim:Stop()
        isDashing = false
        
        task.delay(dashCooldownTime, function()
            dashOnCooldown = false
            dashButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
        end)
    end
end

local function executeSuperJump()
    if not isJumping and not jumpOnCooldown and currentStamina >= jumpStaminaCost and humanoid.Health > 0 then
        isJumping = true
        jumpOnCooldown = true
        currentStamina = currentStamina - jumpStaminaCost
        jumpButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
        
        sound:Play()
        local dir = Vector3.new(camera.CFrame.LookVector.X, 0, camera.CFrame.LookVector.Z).Unit
        hrp.Velocity = (dir * 150) + Vector3.new(0, 50, 0)

        task.delay(0.1, function() if isJumping then loadedAnim:Play() end end)
        
        task.delay(jumpCooldownTime, function()
            jumpOnCooldown = false
            jumpButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
        end)
    end
end

dashButton.MouseButton1Click:Connect(executeDash)
jumpButton.MouseButton1Click:Connect(executeSuperJump)

humanoid.StateChanged:Connect(function(_, newState)
    if newState == Enum.HumanoidStateType.Landed and isJumping then
        isJumping = false
        loadedAnim:Stop()
        createDust()
    end
end)

runService.Heartbeat:Connect(function(dt)
    currentStamina = math.min(maxStamina, currentStamina + (regenRate * dt))
    staminaFill.Size = UDim2.new(currentStamina / maxStamina, 0, 1, 0)
    staminaLabel.Text = math.floor(currentStamina) .. " / " .. maxStamina
end)

player.CharacterAdded:Connect(function(newChar)
    character = newChar
    humanoid = newChar:WaitForChild("Humanoid")
    hrp = newChar:WaitForChild("HumanoidRootPart")
    loadedAnim = humanoid:LoadAnimation(animation)
end)

Ratings & Reviews

No reviews yet. Be the first to review this script!

Comments (0)

Please login to comment

Login with Discord

Loading comments...