Advertisement
Iforgotputthis

Aimbot

Nov 15th, 2024
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. -- Simple GUI Library Example for Solara
  2.  
  3. local Library = {}
  4.  
  5. -- Create Window function
  6. function Library:CreateWindow(title)
  7. local window = Instance.new("ScreenGui")
  8. window.Name = title
  9. window.Parent = game:GetService("CoreGui")
  10.  
  11. local frame = Instance.new("Frame")
  12. frame.Size = UDim2.new(0, 300, 0, 200)
  13. frame.Position = UDim2.new(0.5, -150, 0.5, -100)
  14. frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  15. frame.Parent = window
  16.  
  17. local titleLabel = Instance.new("TextLabel")
  18. titleLabel.Size = UDim2.new(1, 0, 0, 40)
  19. titleLabel.Text = title
  20. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  21. titleLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  22. titleLabel.Parent = frame
  23.  
  24. -- Return the window object for further customization
  25. return {
  26. Window = window,
  27. Frame = frame,
  28. TitleLabel = titleLabel
  29. }
  30. end
  31.  
  32. -- Create Toggle button function
  33. function Library:CreateToggle(label, callback)
  34. local toggleFrame = Instance.new("Frame")
  35. toggleFrame.Size = UDim2.new(1, 0, 0, 50)
  36. toggleFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  37. toggleFrame.Parent = self.Frame
  38.  
  39. local toggleLabel = Instance.new("TextLabel")
  40. toggleLabel.Size = UDim2.new(0.6, 0, 1, 0)
  41. toggleLabel.Text = label
  42. toggleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. toggleLabel.BackgroundTransparency = 1
  44. toggleLabel.Parent = toggleFrame
  45.  
  46. local toggleButton = Instance.new("TextButton")
  47. toggleButton.Size = UDim2.new(0.3, 0, 1, 0)
  48. toggleButton.Position = UDim2.new(0.7, 0, 0, 0)
  49. toggleButton.Text = "OFF"
  50. toggleButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
  51. toggleButton.Parent = toggleFrame
  52.  
  53. toggleButton.MouseButton1Click:Connect(function()
  54. if toggleButton.Text == "OFF" then
  55. toggleButton.Text = "ON"
  56. toggleButton.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
  57. callback(true)
  58. else
  59. toggleButton.Text = "OFF"
  60. toggleButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
  61. callback(false)
  62. end
  63. end)
  64.  
  65. return toggleButton
  66. end
  67.  
  68. return Library
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement