
7.3k Views
2.1k Executions
Lay button
Universal Script 📌
Cadhoun10K executions
2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Nothing, u can just lay
local player = game.Players.LocalPlayer
local screenGui = Instance.new("ScreenGui")
screenGui.ResetOnSpawn = false -- Asegura que la interfaz no se reinicie con el personaje
screenGui.Parent = player:WaitForChild("PlayerGui")
-- Botón "Lay"
local layButton = Instance.new("TextButton")
layButton.Size = UDim2.new(0.05, 0, 0.05, 0) -- Tamaño pequeño
layButton.Position = UDim2.new(0.4, 0, 0.4, 0)
layButton.Text = "Lay"
layButton.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5) -- Gris
layButton.BackgroundTransparency = 0.48 -- 48% transparente
layButton.Parent = screenGui
-- Variable para rastrear si el personaje está acostado
local isLaying = false
-- Función para alternar entre acostarse y regresar a la posición normal
layButton.MouseButton1Click:Connect(function()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass("Humanoid")
local rootPart = character:FindFirstChild("HumanoidRootPart")
if humanoid and rootPart then
if isLaying then
-- Volver a la posición normal
humanoid.PlatformStand = false
rootPart.CFrame = rootPart.CFrame * CFrame.Angles(math.rad(-90), 0, 0) -- Revertir la rotación
isLaying = false
else
-- Acostarse
humanoid.PlatformStand = true
rootPart.CFrame = rootPart.CFrame * CFrame.Angles(math.rad(90), 0, 0) -- Acostar al personaje
isLaying = true
end
end
end)
-- Botón "Remove"
local removeButton = Instance.new("TextButton")
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!






