Universal Script 📌
2.3k Views
357 Executions

high jump

Universal Script 📌
ramazan1337
ramazan1337Published 5
9 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

high jump

View Raw
local UserInputService = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

local defaultJumpPower = humanoid.JumpPower
local highJumpPower = 150 -- желтая высота прыжка

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    
    if input.KeyCode == Enum.KeyCode.R then
        -- при нажатии клавиши R увеличим прыжковую силу
        humanoid.JumpPower = highJumpPower
        -- чтобы персонаж немедленно прыгнул (если он был на земле)
        humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
    end
end)

UserInputService.InputEnded:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    
    if input.KeyCode == Enum.KeyCode.R then
        -- возвращаем возврат к обычной силе при отпускании клавиши
        humanoid.JumpPower = defaultJumpPower
    end
end)


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!