Advertisement
Guest User

Secret

a guest
Aug 17th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.59 KB | None | 0 0
  1. local function CreateInstance(cls,props)
  2. local inst = Instance.new(cls)
  3. for i,v in pairs(props) do
  4.     inst[i] = v
  5. end
  6. return inst
  7. end
  8.    
  9. local Toggler = CreateInstance('ScreenGui',{DisplayOrder=0,Enabled=true,ResetOnSpawn=true,Name='Toggler', Parent=game.CoreGui})
  10. local ToggleFrame = CreateInstance('Frame',{Style=Enum.FrameStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0, 0, 0),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.566065907, 0, 0.512962878, 0),Rotation=0,Selectable=false,Size=UDim2.new(0, 255, 0, 114),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name = 'ToggleFrame',Parent = Toggler, Active = true, Draggable = true})
  11. local Main = CreateInstance('TextButton',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size14,Text='OFF',TextColor3=Color3.new(1, 0, 0),TextScaled=true,TextSize=14,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.294118, 0.294118, 0.294118),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0.271659195, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 255, 0, 82),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='Main',Parent = ToggleFrame})
  12. local Exit = CreateInstance('TextButton',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size14,Text='X',TextColor3=Color3.new(0, 0, 0),TextScaled=true,TextSize=14,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 0, 0),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.90196079, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 25, 0, 30),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='Exit',Parent = ToggleFrame})
  13. local Text = CreateInstance('TextLabel',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size14,Text='ToggleGui',TextColor3=Color3.new(0.807843, 0.807843, 0.807843),TextScaled=true,TextSize=14,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0, 0, 0),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=false,Size=UDim2.new(0, 230, 0, 30),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='Text',Parent = ToggleFrame})
  14.  
  15. --script
  16. toggled = false
  17. Exit.MouseButton1Click:Connect(function()
  18. Toggler:Destroy()
  19. end)
  20. Main.MouseButton1Click:Connect(function()
  21. if Main.Text == "OFF" then
  22. toggled = true
  23.     Main.Text = "ON"
  24.     Main.TextColor3 = Color3.new(0, 255, 0)
  25. Script()
  26. elseif Main.Text == "ON" then
  27.     toggled = false
  28.     Main.Text = "OFF"
  29.     Main.TextColor3 = Color3.new(255, 0, 0)
  30. end end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement