Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --========3D guis toggled========
- -- Type "/e rg" to remove the toggled gui
- -- rg means Remove gui btw
- -- The "/e d<nunber>" its kinda buggy i'll try to fix it if i got time
- -- d<number> means drag with numbers example like d10 it would give you 10 seconds to lets you drag
- -- SussyXDDDDdDDdDDDD
- --[[ YOU CAN USE THIS LOADSTRING TOO RIGHT HERE
- _G.ToggleKeybind = Enum.KeyCode.F
- loadstring(game:HttpGet("https://pastebin.com/raw/hR2R1hu1"))()
- — So that was a loadstring if you want to change the key i bet you already know how to do that
- YT:
- ░██████╗██╗░░░██╗░██████╗░██████╗██╗░░░██╗
- ██╔════╝██║░░░██║██╔════╝██╔════╝╚██╗░██╔╝
- ╚█████╗░██║░░░██║╚█████╗░╚█████╗░░╚████╔╝░
- ░╚═══██╗██║░░░██║░╚═══██╗░╚═══██╗░░╚██╔╝░░
- ██████╔╝╚██████╔╝██████╔╝██████╔╝░░░██║░░░
- ╚═════╝░░╚═════╝░╚═════╝░╚═════╝░░░░╚═╝░░░
- ██╗░░██╗██████╗░██████╗░
- ╚██╗██╔╝██╔══██╗██╔══██╗
- ░╚███╔╝░██║░░██║██║░░██║
- ░██╔██╗░██║░░██║██║░░██║
- ██╔╝╚██╗██████╔╝██████╔╝
- ╚═╝░░╚═╝╚═════╝░╚═════╝░
- ]]
- local player = game.Players.LocalPlayer
- local userInput = game:GetService("UserInputService")
- local runService = game:GetService("RunService")
- local tweenService = game:GetService("TweenService")
- --======= CHANGE YOUr KEYBIND HERE =======--
- local toggleKey = _G.ToggleKeybind or Enum.KeyCode.F
- local function createGui()
- local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- gui.Name = "FloatingGuiToggle"
- gui.ResetOnSpawn = false
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 120, 0, 40)
- toggleButton.Position = UDim2.new(1, -130, 0, 20)
- toggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggleButton.Text = "Hide 3D GUI"
- toggleButton.Font = Enum.Font.GothamBold
- toggleButton.TextScaled = true
- toggleButton.BackgroundTransparency = 0
- toggleButton.TextTransparency = 0
- toggleButton.Parent = gui
- Instance.new("UICorner", toggleButton).CornerRadius = UDim.new(0, 12)
- local isVisible = true
- local dragging = false
- local holding = false
- local dragOffset = Vector2.new()
- local startTime = 0
- local countdownTime = 0
- local countdownRunning = false
- local function toggle3DGui()
- isVisible = not isVisible
- toggleButton.Text = isVisible and "Hide 3D GUI" or "Show 3D GUI"
- for _, part in ipairs(workspace:GetChildren()) do
- if part:IsA("Part") and part:FindFirstChildWhichIsA("SurfaceGui") then
- part.Transparency = isVisible and 0.8 or 1
- part.CanCollide = isVisible
- for _, sg in ipairs(part:GetChildren()) do
- if sg:IsA("SurfaceGui") then
- sg.Enabled = isVisible
- end
- end
- end
- end
- end
- toggleButton.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- startTime = tick()
- holding = true
- dragOffset = input.Position - toggleButton.AbsolutePosition
- local conn
- conn = runService.RenderStepped:Connect(function()
- if not holding then conn:Disconnect() return end
- if tick() - startTime >= 0.3 and not dragging then
- dragging = true
- toggleButton.BackgroundColor3 = Color3.fromRGB(50, 50, 255)
- end
- end)
- end
- end)
- userInput.InputChanged:Connect(function(input)
- if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
- local pos = input.Position - dragOffset
- toggleButton.Position = UDim2.new(0, pos.X, 0, pos.Y)
- end
- end)
- toggleButton.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- if dragging then
- dragging = false
- toggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- elseif tick() - startTime < 0.3 then
- toggle3DGui()
- end
- holding = false
- end
- end)
- userInput.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end
- if input.KeyCode == toggleKey then
- toggle3DGui()
- end
- end)
- player.Chatted:Connect(function(msg)
- if msg:lower() == "/e rg" and gui and gui.Parent then
- toggleButton.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
- toggleButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- toggleButton.Text = "2"
- for i = 2, 1, -1 do
- toggleButton.Text = tostring(i)
- wait(1)
- end
- local tween = tweenService:Create(toggleButton, TweenInfo.new(0.6), {
- BackgroundTransparency = 1,
- TextTransparency = 1
- })
- tween:Play()
- tween.Completed:Wait()
- gui:Destroy()
- end
- end)
- player.Chatted:Connect(function(msg)
- if msg:lower():match("^/e d(%d+)$") then
- local num = tonumber(msg:match("^/e d(%d+)$"))
- if num then
- toggleButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255)
- toggleButton.Text = tostring(num)
- countdownTime = num
- countdownRunning = true
- dragging = true
- for i = countdownTime, 1, -1 do
- if not countdownRunning then break end
- toggleButton.Text = tostring(i)
- wait(1)
- end
- countdownRunning = false
- dragging = false
- toggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- toggleButton.Text = "Hide 3D GUI"
- end
- end
- end)
- end
- createGui()
- task.wait(1)
- player:Chat("/e reload")
- player:Chat("/e reload")
- player.Chatted:Connect(function(msg)
- if msg:lower() == "/e reg" then
- if not player:FindFirstChild("PlayerGui"):FindFirstChild("FloatingGuiToggle") then
- local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- gui.Name = "FloatingGuiToggle"
- gui.ResetOnSpawn = false
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(0, 120, 0, 40)
- btn.Position = UDim2.new(1, -130, 0, 20)
- btn.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- btn.TextColor3 = Color3.fromRGB(255, 255, 255)
- btn.Text = "..."
- btn.Font = Enum.Font.GothamBold
- btn.TextScaled = true
- btn.BackgroundTransparency = 1
- btn.TextTransparency = 1
- btn.Parent = gui
- Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 12)
- local tween = tweenService:Create(btn, TweenInfo.new(0.6), {
- BackgroundTransparency = 0,
- TextTransparency = 0,
- })
- tween:Play()
- tween.Completed:Wait()
- btn:Destroy()
- createGui()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement