Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local ChatService = game:GetService("Chat")
- local FlySpeed = 50
- local Flying = false
- local FlyDirection = Vector3.new(0, 0, 0)
- -- UI Creation
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = game.CoreGui
- local MainFrame = Instance.new("Frame", ScreenGui)
- MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- MainFrame.Position = UDim2.new(0.5, -125, 0.5, -175)
- MainFrame.Size = UDim2.new(0, 250, 0, 350)
- local Title = Instance.new("TextLabel", MainFrame)
- Title.Text = "Admin Panel"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.Size = UDim2.new(1, 0, 0, 40)
- Title.BackgroundTransparency = 1
- Title.Font = Enum.Font.SourceSans
- Title.TextSize = 24
- local Subtitle = Instance.new("TextLabel", MainFrame)
- Subtitle.Text = "m7sn is the best"
- Subtitle.TextColor3 = Color3.fromRGB(255, 255, 255)
- Subtitle.Size = UDim2.new(1, 0, 0, 20)
- Subtitle.Position = UDim2.new(0, 0, 0, 40)
- Subtitle.BackgroundTransparency = 1
- Subtitle.Font = Enum.Font.SourceSans
- Subtitle.TextSize = 18
- local function CreateButton(name, position, callback)
- local Button = Instance.new("TextButton", MainFrame)
- Button.Text = name
- Button.Position = position
- Button.Size = UDim2.new(0, 200, 0, 30)
- Button.BackgroundColor3 = Color3.fromRGB(75, 0, 130)
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.Font = Enum.Font.SourceSans
- Button.TextSize = 18
- Button.MouseButton1Click:Connect(callback)
- return Button
- end
- local SpeedInputBox = Instance.new("TextBox", MainFrame)
- SpeedInputBox.Position = UDim2.new(0, 25, 0, 260)
- SpeedInputBox.Size = UDim2.new(0, 200, 0, 30)
- SpeedInputBox.BackgroundColor3 = Color3.fromRGB(75, 0, 130)
- SpeedInputBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- SpeedInputBox.Font = Enum.Font.SourceSans
- SpeedInputBox.TextSize = 18
- SpeedInputBox.PlaceholderText = "Enter Fly Speed"
- SpeedInputBox.Text = tostring(FlySpeed)
- SpeedInputBox.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- local newSpeed = tonumber(SpeedInputBox.Text)
- if newSpeed then
- FlySpeed = newSpeed
- end
- end
- end)
- local CloseButton = Instance.new("TextButton", MainFrame)
- CloseButton.Text = "Close"
- CloseButton.Position = UDim2.new(1, -30, 0, 5)
- CloseButton.Size = UDim2.new(0, 25, 0, 25)
- CloseButton.BackgroundColor3 = Color3.fromRGB(75, 0, 130)
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.Font = Enum.Font.SourceSans
- CloseButton.TextSize = 14
- CloseButton.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- end)
- -- Functions for Fly, Noclip, etc.
- local function StartFly()
- local Character = Player.Character or Player.CharacterAdded:Wait()
- local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
- local BodyGyro = Instance.new("BodyGyro", HumanoidRootPart)
- local BodyVelocity = Instance.new("BodyVelocity", HumanoidRootPart)
- BodyGyro.MaxTorque = Vector3.new(400000, 400000, 400000)
- BodyGyro.P = 3000
- BodyGyro.CFrame = HumanoidRootPart.CFrame
- BodyVelocity.Velocity = Vector3.new(0, 0, 0)
- BodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000)
- Flying = true
- RunService.Heartbeat:Connect(function()
- if Flying then
- HumanoidRootPart.CFrame = HumanoidRootPart.CFrame * CFrame.new(FlyDirection * FlySpeed / 10)
- BodyGyro.CFrame = CFrame.new(HumanoidRootPart.Position, Mouse.Hit.p)
- else
- BodyGyro:Destroy()
- BodyVelocity:Destroy()
- end
- end)
- end
- local function StopFly()
- Flying = false
- end
- local function ToggleFly()
- if Flying then
- StopFly()
- else
- StartFly()
- end
- end
- local Noclipping = false
- local function ToggleNoclip()
- Noclipping = not Noclipping
- if Noclipping then
- RunService.Stepped:Connect(function()
- for _, v in pairs(Player.Character:GetDescendants()) do
- if v:IsA("BasePart") and v.CanCollide then
- v.CanCollide = false
- end
- end
- end)
- end
- end
- local function TeleportToMouse()
- if Mouse.Target then
- Player.Character.HumanoidRootPart.CFrame = CFrame.new(Mouse.Hit.p + Vector3.new(0, 5, 0))
- end
- end
- local ESPEnabled = false
- local function ToggleESP()
- ESPEnabled = not ESPEnabled
- for _, v in pairs(game.Players:GetPlayers()) do
- if v ~= Player then
- if ESPEnabled then
- local Highlight = Instance.new("Highlight", v.Character)
- Highlight.FillColor = Color3.new(1, 0, 0)
- Highlight.OutlineTransparency = 0.5
- else
- if v.Character:FindFirstChildOfClass("Highlight") then
- v.Character:FindFirstChildOfClass("Highlight"):Destroy()
- end
- end
- end
- end
- end
- CreateButton("Fly (E)", UDim2.new(0, 25, 0, 60), ToggleFly)
- CreateButton("Noclip (N)", UDim2.new(0, 25, 0, 110), ToggleNoclip)
- CreateButton("Teleport to Mouse (T)", UDim2.new(0, 25, 0, 160), TeleportToMouse)
- CreateButton("ESP Toggle (P)", UDim2.new(0, 25, 0, 210), ToggleESP)
- local function isTyping()
- return UIS:GetFocusedTextBox() ~= nil
- end
- UIS.InputBegan:Connect(function(input)
- if isTyping() then return end
- if input.KeyCode == Enum.KeyCode.E then
- ToggleFly()
- elseif input.KeyCode == Enum.KeyCode.N then
- ToggleNoclip()
- elseif input.KeyCode == Enum.KeyCode.T then
- TeleportToMouse()
- elseif input.KeyCode == Enum.KeyCode.P then
- ToggleESP()
- elseif input.KeyCode == Enum.KeyCode.BackSlash then
- MainFrame.Visible = not MainFrame.Visible
- elseif input.KeyCode == Enum.KeyCode.W then
- FlyDirection = Vector3.new(0, 0, -1)
- elseif input.KeyCode == Enum.KeyCode.S then
- FlyDirection = Vector3.new(0, 0, 1)
- elseif input.KeyCode == Enum.KeyCode.A then
- FlyDirection = Vector3.new(-1, 0, 0)
- elseif input.KeyCode == Enum.KeyCode.D then
- FlyDirection = Vector3.new(1, 0, 0)
- elseif input.KeyCode == Enum.KeyCode.Space then
- FlyDirection = Vector3.new(0, 1, 0)
- elseif input.KeyCode == Enum.KeyCode.LeftControl then
- FlyDirection = Vector3.new(0, -1, 0)
- end
- end)
- UIS.InputEnded:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.S or
- input.KeyCode == Enum.KeyCode.A or input.KeyCode == Enum.KeyCode.D or
- input.KeyCode == Enum.KeyCode.Space or input.KeyCode == Enum.KeyCode.LeftControl then
- FlyDirection = Vector3.new(0, 0, 0)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement