Como criar blox fruits no studio lite (PARTE 1)
tudo sobre tutoriais de jogos mobile
0:00 / 0:00
Como criar blox fruits no studio lite (PARTE 1)
14 578 просмотров · 10 месяцев назад
tudo sobre tutoriais de jogos mobile
1,07 тыс. подписчиков
14 578 просмотров · 10 месяцев назад
script do pulo duplo:
-- Double Jump Script (LocalScript)
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local canDoubleJump = false
local doubleJumped = false
local jumpCooldown = false
local function onJumpRequest()
if jumpCooldown then return end
if not doubleJumped and canDoubleJump then
doubleJumped = true
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
-- Força extra do pulo duplo
humanoid.JumpPower = 60
humanoid.Jump = true
task.wait(0.1)
humanoid.JumpPower = 50 -- volte ao normal (mude se quiser)
end
end
humanoid.StateChanged:Connect(function(oldState, newState)
if newState == Enum.HumanoidStateType.Landed then
-- reset quando tocar no chão
doubleJumped = false
canDoubleJump = false
jumpCooldown = false
end
if newState == Enum.HumanoidStateType.Freefall then
-- quando estiver caindo, habilita pulo duplo
if not doubleJumped then
canDoubleJump = true
end
end
if newState == Enum.HumanoidStateType.Jumping then
-- impede spam do primeiro pulo
if not doubleJumped then
jumpCooldown = true
task.wait(0.2)
jumpCooldown = false
end
end
end)
UserInputService.JumpRequest:Connect(onJumpRequest)
modelo kit inicial blox fruit:
4941830875
se inscreva no meu canal pls :(