Advertisement
HURRYUPKAREN

Roblox FE Sit Gui Script

Aug 14th, 2023
2,231
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 1 0
  1. -- Creating the GUI
  2. local player = game.Players.LocalPlayer
  3. local mouse = player:GetMouse()
  4.  
  5. local gui = Instance.new("ScreenGui")
  6. gui.Name = "SitGUI"
  7. gui.Parent = player.PlayerGui
  8.  
  9. local frame = Instance.new("Frame")
  10. frame.Size = UDim2.new(0, 200, 0, 150)
  11. frame.Position = UDim2.new(0, 100, 0, 100)
  12. frame.BackgroundTransparency = 0.5
  13. frame.BackgroundColor3 = Color3.fromRGB(255, 255, 0) -- Yellow
  14. frame.Active = true
  15. frame.Draggable = true
  16. frame.Parent = gui
  17.  
  18. local titleLabel = Instance.new("TextLabel")
  19. titleLabel.Size = UDim2.new(1, 0, 0, 30)
  20. titleLabel.Text = "Sit GUI"
  21. titleLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 0) -- Yellow
  22. titleLabel.Parent = frame
  23.  
  24. local closeButton = Instance.new("TextButton")
  25. closeButton.Size = UDim2.new(0, 50, 0, 30)
  26. closeButton.Position = UDim2.new(1, -50, 0, 0)
  27. closeButton.Text = "X"
  28. closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red
  29. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  30. closeButton.Parent = titleLabel
  31.  
  32. local pressToSitButton = Instance.new("TextButton")
  33. pressToSitButton.Size = UDim2.new(0, 150, 0, 50)
  34. pressToSitButton.Position = UDim2.new(0.5, -75, 0.5, -25)
  35. pressToSitButton.Text = "Press to sit!"
  36. pressToSitButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green
  37. pressToSitButton.Parent = frame
  38.  
  39. -- Handling button click
  40. pressToSitButton.MouseButton1Click:Connect(function()
  41. player.Character.Humanoid.Sit = true
  42. end)
  43.  
  44. -- Handling close button click
  45. closeButton.MouseButton1Click:Connect(function()
  46. gui:Destroy()
  47. end)
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement