0% found this document useful (0 votes)
292 views2 pages

Draggable Sit Button Script for Roblox

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
292 views2 pages

Draggable Sit Button Script for Roblox

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

-- Create a ScreenGui object to hold the draggable GUI

local gui = [Link]("ScreenGui")


[Link] = "DraggableGui"
[Link] = [Link]

-- Create a Frame object to hold the text label and button


local frame = [Link]("Frame")
[Link] = "DraggableFrame"
[Link] = [Link](0, 150, 0, 60)
[Link] = [Link](0.5, -75, 0.5, -30)
frame.BackgroundColor3 = [Link](1, 1, 1)
[Link] = 0.5
[Link] = true
[Link] = true
[Link] = gui

-- Create a TextLabel object to show the text


local textLabel = [Link]("TextLabel")
[Link] = "TextLabel"
[Link] = [Link](1, 0, 0.5, 0)
[Link] = [Link](0, 0, 0, 0)
textLabel.BackgroundColor3 = [Link](0, 0, 0)
[Link] = 0.5
[Link] = "MADE BY IAB"
[Link] = [Link]
textLabel.TextColor3 = [Link](1, 1, 1)
[Link] = 18
[Link] = frame

-- Create a TextButton object to act as the "SIT" button


local sitButton = [Link]("TextButton")
[Link] = "SitButton"
[Link] = [Link](1, 0, 0.5, 0)
[Link] = [Link](0, 0, 0.5, 0)
sitButton.BackgroundColor3 = [Link](0, 0, 0)
[Link] = 0.5
[Link] = "SIT"
[Link] = [Link]
sitButton.TextColor3 = [Link](1, 1, 1)
[Link] = 18
[Link] = frame

-- Define a function to make the player character sit


local function sit()
local character = [Link]
if character then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
[Link] = true
end
end
end

-- Define a function to make the player character stand up


local function standUp()
local character = [Link]
if character then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
[Link] = false
end
end
end

-- Connect the SitButton to the sit() function


sitButton.MouseButton1Click:Connect(function()
sit()
end)

-- Connect the [Link] event to the standUp() function


[Link]:Connect(function(character)
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
[Link]:Connect(function()
standUp()
end)
end
end)

You might also like