LynXS_

Untitled

Jul 27th, 2024
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. --[[
  2. WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
  3. ]]
  4. local ScreenGui = Instance.new("ScreenGui")
  5. ScreenGui.Name = "ScreenGui"
  6. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  7. ScreenGui.ResetOnSpawn = false
  8.  
  9. local Toggle = Instance.new("TextButton")
  10. Toggle.Name = "Toggle"
  11. Toggle.Parent = ScreenGui
  12. Toggle.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Start with red (off)
  13. Toggle.BackgroundTransparency = 0.5 -- Set the button transparency to 0.5
  14. Toggle.Position = UDim2.new(0, 0, 0.454706937, 0)
  15. Toggle.Size = UDim2.new(0, 50, 0, 50) -- Smaller size for a compact circular button
  16. Toggle.Font = Enum.Font.SourceSans
  17. Toggle.Text = "Close" -- Start with "Close"
  18. Toggle.TextColor3 = Color3.fromRGB(248, 248, 248)
  19. Toggle.TextSize = 18.000 -- Adjust text size for smaller button
  20. Toggle.Draggable = true
  21.  
  22. local Corner = Instance.new("UICorner")
  23. Corner.CornerRadius = UDim.new(0.5, 0) -- Make the button circular
  24. Corner.Parent = Toggle
  25.  
  26. local isOn = false -- Initial state is off
  27.  
  28. -- Function to handle the "On" state
  29. local function onButtonClicked()
  30. game:GetService("VirtualInputManager"):SendKeyEvent(true,Enum.KeyCode.RightShift,false,game)
  31. if gethui():FindFirstChild("Orion") then
  32. gethui().Orion.Enabled = not gethui().Orion.Enabled
  33. end
  34. end
  35.  
  36. -- Function to handle the "Off" state
  37. local function offButtonClicked()
  38. -- Add your code for what should happen when the button is in the "Off" state
  39. if gethui():FindFirstChild("Orion") then
  40. gethui().Orion.Enabled = not gethui().Orion.Enabled
  41. end
  42. end
  43.  
  44. Toggle.MouseButton1Click:Connect(function()
  45. isOn = not isOn -- Toggle state
  46. if isOn then
  47. Toggle.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green (on)
  48. Toggle.Text = "Open"
  49. onButtonClicked() -- Call the function for "On" state
  50. else
  51. Toggle.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red (off)
  52. Toggle.Text = "Close"
  53. offButtonClicked() -- Call the function for "Off" state
  54. end
  55. end)
  56.  
  57. -- Paste Your Script Orion Here
  58. -- orion blue themed https://github.com/RScripter/ORION-BLUE-THEME
  59. -- orion original https://github.com/shlexware/orion
Advertisement
Add Comment
Please, Sign In to add comment