Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// SERVICES
- local Lighting = game:GetService("Lighting")
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local Character
- local Humanoid
- local hrp
- local function UpdateCharacter(char)
- Character = char
- Humanoid = char:WaitForChild("Humanoid")
- hrp = char:WaitForChild("HumanoidRootPart")
- end
- -- First character
- UpdateCharacter(LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait())
- -- On every respawn
- LocalPlayer.CharacterAdded:Connect(function(char)
- UpdateCharacter(char)
- end)
- local Mouse = LocalPlayer:GetMouse()
- --// GUI ROOT
- local GUI = Instance.new("ScreenGui", LocalPlayer.PlayerGui)
- GUI.ResetOnSpawn = false
- --------------------------------------------------------
- -- =============== FRAME CREATION ======================
- --------------------------------------------------------
- -- Title
- local Title = Instance.new("TextLabel", GUI)
- Title.Size = UDim2.fromScale(.2, .12)
- Title.Position = UDim2.fromScale(.06, .065)
- Title.BackgroundColor3 = Color3.fromRGB(91,92,113)
- Title.Text = "Admin GUI"
- Title.Font = Enum.Font.FredokaOne
- Title.TextScaled = true
- Title.ZIndex = 5
- -- Built-in Drag Detector
- local drag = Instance.new("UIDragDetector")
- drag.Parent = Title
- local TitleCorner = Instance.new("UICorner", Title)
- TitleCorner.CornerRadius = UDim.new(.1,8)
- -- MAIN MENU FRAME
- local MainFrame = Instance.new("Frame", Title)
- MainFrame.Size = UDim2.fromScale(1,6)
- MainFrame.Position = UDim2.fromScale(0,1)
- MainFrame.BackgroundColor3 = Color3.fromRGB(91,92,113)
- local MenuCorner = Instance.new("UICorner", MainFrame)
- -- SUBPAGES
- local PlayerPage = Instance.new("Frame", GUI)
- local OtherPlayerPage = Instance.new("Frame", GUI)
- local VisualsPage = Instance.new("Frame", GUI)
- local GamePage = Instance.new("Frame", GUI)
- local Pages = {PlayerPage, VisualsPage, GamePage, OtherPlayerPage}
- for _,page in pairs(Pages) do
- page.Visible = false
- page.Size = UDim2.fromScale(.2, .7)
- page.Position = UDim2.fromScale(.06, .2)
- page.BackgroundColor3 = Color3.fromRGB(91,92,113)
- Instance.new("UICorner", page)
- local stroke = Instance.new("UIStroke", page)
- stroke.Thickness = 2
- stroke.Color = Color3.fromRGB(0, 0, 0)
- stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- end
- -- BACK BUTTON
- local BackButton = Instance.new("TextButton", GUI)
- BackButton.Size = UDim2.fromScale(.15, .07)
- BackButton.Position = UDim2.fromScale(.07, .92)
- BackButton.Text = "Back"
- BackButton.BackgroundColor3 = Color3.fromRGB(30,20,175)
- BackButton.TextColor3 = Color3.new(1,1,1)
- BackButton.Visible = false
- Instance.new("UICorner", BackButton)
- --------------------------------------------------------
- -- ============ BUTTONS TO OPEN PAGES ==================
- --------------------------------------------------------
- local function CreateMenuButton(name, y)
- local b = Instance.new("TextButton", MainFrame)
- b.Size = UDim2.fromScale(1, .2)
- b.Position = UDim2.fromScale(0, y)
- b.BackgroundColor3 = Color3.fromRGB(30,20,175)
- b.TextColor3 = Color3.new(1,1,1)
- b.Text = name
- b.TextScaled = true
- b.Font = Enum.Font.FredokaOne
- b.TextSize = 30
- Instance.new("UICorner", b)
- return b
- end
- local PlayerButton = CreateMenuButton("Local Player", 0)
- local OtherPlayerButton = CreateMenuButton("Other Player", .25)
- local VisualsButton = CreateMenuButton("Visuals", .5)
- local GameButton = CreateMenuButton("Game", .75)
- --------------------------------------------------------
- -- ================= PAGE HELPER =======================
- --------------------------------------------------------
- local function OpenPage(frame)
- MainFrame.Visible = false
- for _,p in pairs(Pages) do p.Visible = false end
- frame.Visible = true
- BackButton.Visible = true
- end
- BackButton.MouseButton1Click:Connect(function()
- for _,p in pairs(Pages) do p.Visible = false end
- MainFrame.Visible = true
- BackButton.Visible = false
- end)
- PlayerButton.MouseButton1Click:Connect(function() OpenPage(PlayerPage) end)
- OtherPlayerButton.MouseButton1Click:Connect(function() OpenPage(OtherPlayerPage) end)
- VisualsButton.MouseButton1Click:Connect(function() OpenPage(VisualsPage) end)
- GameButton.MouseButton1Click:Connect(function() OpenPage(GamePage) end)
- --------------------------------------------------------
- -- =============== TEXTBOX CREATOR =====================
- --------------------------------------------------------
- local function AddStroke(instance, thickness, color)
- local stroke = Instance.new("UIStroke")
- stroke.Thickness = thickness or 1
- stroke.Color = color or Color3.fromRGB(0, 0, 0)
- stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- stroke.Parent = instance
- return stroke
- end
- local function CreateTextBox(parent, text, y)
- local label = Instance.new("TextLabel", parent)
- label.Size = UDim2.fromScale(.9, .15)
- label.Position = UDim2.fromScale(.05, y)
- label.BackgroundTransparency = 1
- label.Text = text
- label.Font = Enum.Font.FredokaOne
- label.TextSize = 24
- local box = Instance.new("TextBox", parent)
- box.Size = UDim2.fromScale(.9, .12)
- box.Position = UDim2.fromScale(.05, y + .12)
- box.BackgroundColor3 = Color3.fromRGB(30,20,175)
- box.TextColor3 = Color3.new(1,1,1)
- box.Font = Enum.Font.FredokaOne
- box.TextSize = 20
- Instance.new("UICorner", box)
- return box
- end
- local function CreateToggle(parent, text, y)
- local b = Instance.new("TextButton", parent)
- b.Size = UDim2.fromScale(.9, .12)
- b.Position = UDim2.fromScale(.05, y)
- b.BackgroundColor3 = Color3.fromRGB(30,20,175)
- b.Text = text.." OFF"
- b.TextColor3 = Color3.new(1,1,1)
- b.Font = Enum.Font.FredokaOne
- b.TextScaled = true
- Instance.new("UICorner", b)
- return b
- end
- --------------------------------------------------------
- -- =============== PLAYER PAGE =========================
- --------------------------------------------------------
- local WalkBox = CreateTextBox(PlayerPage, "WalkSpeed", 0)
- local JumpBox = CreateTextBox(PlayerPage, "JumpPower", .2)
- local GravBox = CreateTextBox(PlayerPage, "Gravity", .43)
- local NoclipToggle = CreateToggle(PlayerPage, "Noclip", .75)
- --------------------------------------------------------
- -- =============== OTHER PLAYER PAGE =========================
- --------------------------------------------------------
- local SpinBox = CreateTextBox(OtherPlayerPage, "Spinbot", 0)
- local KillbrickToggle = CreateToggle(OtherPlayerPage, "KillBricks", .3)
- --------------------------------------------------------
- -- =============== VISUALS PAGE ========================
- --------------------------------------------------------
- local FOVBox = CreateTextBox(VisualsPage, "Field of View", 0)
- local ESPToggle = CreateToggle(VisualsPage, "ESP", .3)
- local BrightToggle = CreateToggle(VisualsPage, "Full Bright", .5)
- local PotatoToggle = CreateToggle(VisualsPage, "Potato Mode", .7)
- --------------------------------------------------------
- -- =============== GAME PAGE ===========================
- --------------------------------------------------------
- local TPBox = CreateTextBox(GamePage, "user, display, random friend, random nonfriend, .random, all", 0)
- local LoopTPToggle = CreateToggle(GamePage, "Loop TP", .27)
- local UI_Toggle = CreateToggle(GamePage, "Ultra Instinct", .5)
- -- Main Frame Stroke
- AddStroke(MainFrame, 4)
- AddStroke(Title, 4)
- -- Main Menu Buttons
- AddStroke(PlayerButton, 3)
- AddStroke(OtherPlayerButton, 3)
- AddStroke(VisualsButton, 3)
- AddStroke(GameButton, 3)
- -- PLAYER PAGE
- AddStroke(PlayerPage, 3)
- AddStroke(WalkBox, 3)
- AddStroke(JumpBox, 3)
- AddStroke(GravBox, 3)
- AddStroke(NoclipToggle, 3)
- AddStroke(BackButton, 3)
- -- VISUALS PAGE
- AddStroke(VisualsPage, 3)
- AddStroke(ESPToggle, 3)
- AddStroke(BrightToggle, 3)
- AddStroke(PotatoToggle, 3)
- AddStroke(FOVBox, 3)
- -- GAME PAGE
- AddStroke(GamePage, 3)
- AddStroke(LoopTPToggle, 3)
- AddStroke(UI_Toggle, 3)
- -- OTHER PLAYER PAGE
- AddStroke(OtherPlayerPage, 3)
- AddStroke(SpinBox, 3)
- AddStroke(KillbrickToggle, 3)
- --------------------------------------------------------
- -- ================ FUNCTIONALITY ======================
- --------------------------------------------------------
- ---------------------- Noclip -------------------------
- local noclip = false
- NoclipToggle.MouseButton1Click:Connect(function()
- noclip = not noclip
- NoclipToggle.Text = "Noclip "..(noclip and "ON" or "OFF")
- end)
- local KillBricks = false
- KillbrickToggle.MouseButton1Click:Connect(function()
- KillBricks = not KillBricks
- KillbrickToggle.Text = "Killbrick "..(KillBricks and "ON" or "OFF")
- end)
- ------------------------ ESP --------------------------
- local espOn = false
- local highlights = {}
- local function createESP(plr)
- if plr == LocalPlayer then return end
- if highlights[plr] then return end
- if not plr.Character then return end
- if not plr.Character:FindFirstChild("Head") then return end
- -- Highlight object
- local hl = Instance.new("Highlight")
- hl.FillTransparency = 0.7
- hl.OutlineColor = Color3.fromRGB(255,25,25)
- hl.Adornee = plr.Character
- hl.Parent = GUI
- -- Billboard name
- local head = plr.Character.Head
- local bill = Instance.new("BillboardGui")
- bill.Size = UDim2.new(0,100,0,25)
- bill.StudsOffset = Vector3.new(0,2.5,0)
- bill.AlwaysOnTop = true
- bill.Parent = GUI
- bill.Adornee = head
- local label = Instance.new("TextLabel")
- label.Parent = bill
- label.Size = UDim2.fromScale(1,1)
- label.BackgroundTransparency = 1
- label.Text = plr.Name
- label.TextColor3 = Color3.fromRGB(255,255,255)
- label.TextStrokeTransparency = 0.2
- label.Font = Enum.Font.FredokaOne
- label.TextSize = 19
- -- Store ESP
- highlights[plr] = {
- highlight = hl,
- billboard = bill,
- }
- end
- local function removeESP(plr)
- if highlights[plr] then
- if highlights[plr].highlight then highlights[plr].highlight:Destroy() end
- if highlights[plr].billboard then highlights[plr].billboard:Destroy() end
- highlights[plr] = nil
- end
- end
- local function updateAllESP()
- for _,plr in pairs(Players:GetPlayers()) do
- if espOn then
- if plr ~= LocalPlayer and plr.Character then
- createESP(plr)
- end
- else
- removeESP(plr)
- end
- end
- end
- ESPToggle.MouseButton1Click:Connect(function()
- espOn = not espOn
- ESPToggle.Text = "ESP "..(espOn and "ON" or "OFF")
- if not espOn then
- for plr,_ in pairs(highlights) do
- removeESP(plr)
- end
- end
- end)
- ---------------------- Full Bright ---------------------
- local brightOn = false
- BrightToggle.MouseButton1Click:Connect(function()
- brightOn = not brightOn
- BrightToggle.Text = "Full Bright "..(brightOn and "ON" or "OFF")
- end)
- --------------------- Potato Mode ----------------------
- local potato = false
- PotatoToggle.MouseButton1Click:Connect(function()
- potato = not potato
- PotatoToggle.Text = "Potato Mode "..(potato and "ON" or "OFF")
- end)
- --------------------- LOOP TP ---------------------------
- local looptp = false
- LoopTPToggle.MouseButton1Click:Connect(function()
- looptp = not looptp
- LoopTPToggle.Text = "Loop TP "..(looptp and "ON" or "OFF")
- end)
- --TELEPORT HELPERS
- -------------------------------------------------------------------
- local function tpToPlayer(plr)
- if plr and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
- Character:SetPrimaryPartCFrame(
- plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,3,0)
- )
- end
- end
- local function findPlayerByName(name)
- name = name:lower()
- for _,plr in pairs(Players:GetPlayers()) do
- if plr.Name:lower() == name or plr.DisplayName:lower() == name then
- return plr
- end
- end
- return nil
- end
- local function getRandomPlayer()
- local list = {}
- for _,plr in pairs(Players:GetPlayers()) do
- if plr ~= LocalPlayer then table.insert(list, plr) end
- end
- if #list == 0 then return nil end
- return list[math.random(#list)]
- end
- local function getRandomFriendInGame()
- local friends = Players:GetFriendsAsync(LocalPlayer.UserId)
- local list = {}
- for _,v in pairs(friends) do
- local p = Players:FindFirstChild(v.Username)
- if p then table.insert(list, p) end
- end
- if #list == 0 then return nil end
- return list[math.random(#list)]
- end
- local function getRandomNonFriend()
- local friends = Players:GetFriendsAsync(LocalPlayer.UserId)
- local friendMap = {}
- for _,f in pairs(friends) do
- friendMap[f.Username] = true
- end
- local list = {}
- for _,plr in pairs(Players:GetPlayers()) do
- if plr ~= LocalPlayer and not friendMap[plr.Name] then
- table.insert(list, plr)
- end
- end
- if #list == 0 then return nil end
- return list[math.random(#list)]
- end
- local function tpAllPlayers()
- for _,plr in pairs(Players:GetPlayers()) do
- if plr ~= LocalPlayer then
- tpToPlayer(plr)
- task.wait(0.25)
- end
- end
- end
- -------------------------------------------------------------------
- -- TEXTBOX COMMAND HANDLER (SpinBox)
- -------------------------------------------------------------------
- TPBox:GetPropertyChangedSignal("Text"):Connect(function()
- local input = TPBox.Text:lower()
- if input == ".random" then
- tpToPlayer(getRandomPlayer())
- elseif input == ".randomfriend" then
- tpToPlayer(getRandomFriendInGame())
- elseif input == ".randomnfriend" then
- tpToPlayer(getRandomNonFriend())
- elseif input == ".all" then
- task.spawn(tpAllPlayers)
- elseif input == ".looptp" then
- looptp = not looptp
- if looptp then
- print("Loop TP enabled")
- else
- print("Loop TP disabled")
- end
- else
- -- username or displayname
- local plr = findPlayerByName(input)
- if plr then
- tpToPlayer(plr)
- end
- end
- end)
- ------------------- Ultra Instinct ---------------------
- --[[
- local uiOn = false
- UI_Toggle.MouseButton1Click:Connect(function()
- uiOn = not uiOn
- UI_Toggle.Text = "Ultra Instinct "..(uiOn and "ON" or "OFF")
- end)
- RunService.Heartbeat:Connect(function()
- if not uiOn then return end
- for _,plr in pairs(Players:GetPlayers()) do
- if plr ~= LocalPlayer and plr.Character and plr.Character.PrimaryPart then
- local dist = (plr.Character.PrimaryPart.Position - Character.PrimaryPart.Position).Magnitude
- if dist < 10 then
- local forward = Character.PrimaryPart.CFrame.LookVector
- Character:SetPrimaryPartCFrame(Character.PrimaryPart.CFrame + forward * 6)
- end
- end
- end
- end)]]
- -------------------------------------------
- -----------------MAIN LOOP-----------------
- -------------------------------------------
- RunService.Heartbeat:Connect(function(dt)
- if tonumber(WalkBox.Text) ~= nil then Humanoid.WalkSpeed = tonumber(WalkBox.Text) end
- if tonumber(JumpBox.Text) ~= nil then Humanoid.JumpPower = tonumber(JumpBox.Text) end
- if tonumber(GravBox.Text) ~= nil then workspace.Gravity = tonumber(GravBox.Text) end
- if tonumber(FOVBox.Text) ~= nil then workspace.CurrentCamera.FieldOfView = tonumber(FOVBox.Text) end
- local val = tonumber(SpinBox.Text)
- if val and val>=0 and val<=2000 then
- hrp.CFrame = hrp.CFrame * CFrame.Angles(0, math.rad(val * 35), 0)
- end
- if noclip then
- for _,v in pairs(Character:GetDescendants()) do
- if v:IsA("BasePart") then v.CanCollide = false end
- end
- elseif not noclip then
- for _,v in pairs(Character:GetDescendants()) do
- if v:IsA("BasePart") then v.CanCollide = true end
- end
- end
- if KillBricks then
- local parts = workspace:GetPartBoundsInRadius(hrp.Position, 100)
- for _, part in ipairs(parts) do
- part.CanTouch = false
- end
- for i, v in pairs(Character:GetChildren()) do
- if v:IsA("BasePart") then
- v.CanTouch = false
- v.CanQuery = false
- end
- end
- else
- local parts = workspace:GetPartBoundsInRadius(hrp.Position, 100)
- for _, part in ipairs(parts) do
- part.CanTouch = true
- end
- for i, v in pairs(Character:GetChildren()) do
- if v:IsA("BasePart") then
- v.CanTouch = true
- v.CanQuery = true
- end
- end
- end
- if espOn then
- for i, player in pairs(Players:GetPlayers()) do
- if player ~= LocalPlayer then
- removeESP(player)
- end
- updateAllESP()
- end
- --[[Player joins
- Players.PlayerAdded:Connect(function(plr)
- plr.CharacterAdded:Connect(function()
- task.wait(0.1)
- if espOn then createESP(plr) end
- end)
- end)
- -- Player leaves
- Players.PlayerRemoving:Connect(function(plr)
- removeESP(plr)
- end)]]
- if brightOn then
- Lighting.Ambient= Color3.new(1,1,1)
- Lighting.OutdoorAmbient = Color3.new(1,1,1)
- Lighting.Brightness = 6
- else
- Lighting.Ambient = Color3.new(.5,.5,.5)
- Lighting.OutdoorAmbient = Color3.new(.5,.5,.5)
- Lighting.Brightness = 4
- end
- if potato then
- for _,v in pairs(workspace:GetDescendants()) do
- if v:IsA("Decal") or v:IsA("Texture") then
- v.Transparency = 1
- end
- if v:IsA("ParticleEmitter") then
- v.Enabled = false
- end
- end
- else
- for _,v in pairs(workspace:GetDescendants()) do
- if v:IsA("Decal") or v:IsA("Texture") then
- v.Transparency = 0
- end
- if v:IsA("ParticleEmitter") then
- v.Enabled = true
- end
- end
- end
- --loop tp
- local lastTarget = nil
- if looptp then
- local target
- repeat target = getRandomPlayer() until target ~= lastTarget
- lastTarget = target
- tpToPlayer(target)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment