Advertisement
AlphaWolf536791

OPTools Gui Script

Jul 12th, 2020
1,564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.30 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local OPToolsGui = Instance.new("ScreenGui")
  7. local OPToolsFrame = Instance.new("Frame")
  8. local SpeedTool = Instance.new("TextButton")
  9. local InvisTool = Instance.new("TextButton")
  10. local Items = Instance.new("Folder")
  11. local ToolGui = Instance.new("ScreenGui")
  12. local SpeedGui = Instance.new("Frame")
  13. local ToggleButton = Instance.new("TextButton")
  14. local InvisGui = Instance.new("Frame")
  15. local ToggleButton_2 = Instance.new("TextButton")
  16. local NotifyBool = Instance.new("TextButton")
  17.  
  18. --Properties:
  19.  
  20. OPToolsGui.Name = "OPToolsGui"
  21. OPToolsGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  22.  
  23. OPToolsFrame.Name = "OPToolsFrame"
  24. OPToolsFrame.Parent = OPToolsGui
  25. OPToolsFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  26. OPToolsFrame.BackgroundTransparency = 0.500
  27. OPToolsFrame.BorderSizePixel = 0
  28. OPToolsFrame.Position = UDim2.new(0.82657516, 0, 0.397101462, 0)
  29. OPToolsFrame.Size = UDim2.new(0, 278, 0, 228)
  30.  
  31. SpeedTool.Name = "SpeedTool"
  32. SpeedTool.Parent = OPToolsFrame
  33. SpeedTool.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  34. SpeedTool.BackgroundTransparency = 0.750
  35. SpeedTool.BorderSizePixel = 0
  36. SpeedTool.Position = UDim2.new(0.140287772, 0, 0.127659574, 0)
  37. SpeedTool.Size = UDim2.new(0, 200, 0, 50)
  38. SpeedTool.Font = Enum.Font.SourceSansSemibold
  39. SpeedTool.Text = "Speed Tool"
  40. SpeedTool.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. SpeedTool.TextSize = 18.000
  42.  
  43. InvisTool.Name = "InvisTool"
  44. InvisTool.Parent = OPToolsFrame
  45. InvisTool.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  46. InvisTool.BackgroundTransparency = 0.750
  47. InvisTool.BorderSizePixel = 0
  48. InvisTool.Position = UDim2.new(0.140287772, 0, 0.389884263, 0)
  49. InvisTool.Size = UDim2.new(0, 200, 0, 50)
  50. InvisTool.Font = Enum.Font.SourceSansSemibold
  51. InvisTool.Text = "Invisibility Tool"
  52. InvisTool.TextColor3 = Color3.fromRGB(255, 255, 255)
  53. InvisTool.TextSize = 18.000
  54.  
  55. Items.Name = "Items"
  56. Items.Parent = OPToolsFrame
  57.  
  58. ToolGui.Name = "ToolGui"
  59. ToolGui.Parent = Items
  60.  
  61. SpeedGui.Name = "SpeedGui"
  62. SpeedGui.Parent = ToolGui
  63. SpeedGui.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  64. SpeedGui.BackgroundTransparency = 0.500
  65. SpeedGui.BorderSizePixel = 0
  66. SpeedGui.Position = UDim2.new(0.744229555, 0, 0.397101462, 0)
  67. SpeedGui.Size = UDim2.new(0, 122, 0, 104)
  68. SpeedGui.Visible = false
  69.  
  70. ToggleButton.Name = "ToggleButton"
  71. ToggleButton.Parent = SpeedGui
  72. ToggleButton.BackgroundColor3 = Color3.fromRGB(53, 53, 243)
  73. ToggleButton.BackgroundTransparency = 0.750
  74. ToggleButton.BorderSizePixel = 0
  75. ToggleButton.Size = UDim2.new(0, 122, 0, 104)
  76. ToggleButton.Font = Enum.Font.SourceSansSemibold
  77. ToggleButton.Text = "Toggle"
  78. ToggleButton.TextColor3 = Color3.fromRGB(53, 53, 243)
  79. ToggleButton.TextSize = 36.000
  80. ToggleButton.TextWrapped = true
  81.  
  82. InvisGui.Name = "InvisGui"
  83. InvisGui.Parent = ToolGui
  84. InvisGui.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  85. InvisGui.BackgroundTransparency = 0.500
  86. InvisGui.BorderSizePixel = 0
  87. InvisGui.Position = UDim2.new(0.744229555, 0, 0.566666663, 0)
  88. InvisGui.Size = UDim2.new(0, 122, 0, 111)
  89. InvisGui.Visible = false
  90.  
  91. ToggleButton_2.Name = "ToggleButton"
  92. ToggleButton_2.Parent = InvisGui
  93. ToggleButton_2.BackgroundColor3 = Color3.fromRGB(53, 53, 243)
  94. ToggleButton_2.BackgroundTransparency = 0.750
  95. ToggleButton_2.BorderSizePixel = 0
  96. ToggleButton_2.Size = UDim2.new(0, 122, 0, 111)
  97. ToggleButton_2.Font = Enum.Font.SourceSansSemibold
  98. ToggleButton_2.Text = "Toggle"
  99. ToggleButton_2.TextColor3 = Color3.fromRGB(53, 53, 243)
  100. ToggleButton_2.TextSize = 36.000
  101. ToggleButton_2.TextWrapped = true
  102.  
  103. NotifyBool.Name = "NotifyBool"
  104. NotifyBool.Parent = OPToolsFrame
  105. NotifyBool.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  106. NotifyBool.BackgroundTransparency = 0.750
  107. NotifyBool.BorderSizePixel = 0
  108. NotifyBool.Position = UDim2.new(0.140287772, 0, 0.661814094, 0)
  109. NotifyBool.Size = UDim2.new(0, 200, 0, 50)
  110. NotifyBool.Font = Enum.Font.SourceSansSemibold
  111. NotifyBool.Text = "Notifications (Yes)"
  112. NotifyBool.TextColor3 = Color3.fromRGB(255, 255, 255)
  113. NotifyBool.TextSize = 18.000
  114.  
  115. -- Scripts:
  116.  
  117. local function GRYESYM_fake_script() -- ToolGui.ButtonClient
  118.     local script = Instance.new('LocalScript', ToolGui)
  119.  
  120.     local plr = game.Players.LocalPlayer
  121.     function WaitForTool(tool, guiName)
  122.         game.StarterGui:SetCore('SendNotification', {
  123.             Title = guiName,
  124.             Text = 'Waiting for player to collect '..tool..' tool.',
  125.             Duration = 5
  126.         })
  127.     end
  128.     WaitForTool('speed', 'SpeedGui')
  129.     WaitForTool('invis', 'InvisGui')
  130.     local tools = { plr.Backpack:WaitForChild('Speed'), plr.Backpack:WaitForChild('Invisibility') }
  131.     script.Parent.SpeedGui.ToggleButton.MouseButton1Click:connect(function()
  132.         workspace[plr.Name].Speed.Toggle.Value = not workspace[plr.Name].Speed.Toggle.Value
  133.     end)
  134.     script.Parent.InvisGui.ToggleButton.MouseButton1Click:connect(function()
  135.         workspace[plr.Name].Invisibility.Toggle.Value = not workspace[plr.Name].Invisibility.Toggle.Value
  136.     end)
  137. end
  138. coroutine.wrap(GRYESYM_fake_script)()
  139. local function LLRRSX_fake_script() -- OPToolsFrame.ButtonClient
  140.     local script = Instance.new('LocalScript', OPToolsFrame)
  141.  
  142.     local plr = game.Players.LocalPlayer
  143.     local backpack = plr.Backpack
  144.     local items = script.Parent.Items
  145.     local notify = script.Parent.Notification.Value
  146.     local debounce = false
  147.     script.Parent.Items.ToolGui.Parent = script.Parent.Parent.Parent
  148.     script.Parent.SpeedTool.MouseButton1Click:connect(function()
  149.         local tool = items.Speed:clone()
  150.         tool.Parent = backpack
  151.     end)
  152.     script.Parent.InvisTool.MouseButton1Click:connect(function()
  153.         local tool = items.Invisibility:clone()
  154.         tool.Parent = backpack
  155.     end)
  156.     script.Parent.NotifyBool.MouseButton1Click:connect(function()
  157.         notify = not notify
  158.         if not debounce then
  159.             debounce = true
  160.             if (notify == true) then
  161.                 script.Parent.NotifyBool.Text = 'Notifications (Yes)'
  162.                 game.StarterGui:SetCore('SendNotification', {
  163.                     Title = 'Tool Notifications',
  164.                     Text = 'Tools notifications have been enabled.\nYou will now be notified.',
  165.                     Duration = 7
  166.                 })
  167.             elseif (notify == false) then
  168.                 script.Parent.NotifyBool.Text = 'Notifcations (No)'
  169.                 game.StarterGui:SetCore('SendNotification', {
  170.                     Title = 'Tool Notifications',
  171.                     Text = 'Tools notifications have been disabled.\nYou will no longer be notified.',
  172.                     Duration = 7
  173.                 })
  174.             end
  175.             wait(7)
  176.             debounce = false
  177.         end
  178.     end)
  179. end
  180. coroutine.wrap(LLRRSX_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement