Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FPS AND HP DOESN'T WORK SORRY :( MIGHT BE SOLVED
- local UIS = game:GetService("UserInputService")
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local camera = workspace.CurrentCamera
- -- Default values
- local defaultValues = {
- SpeedChanger = 16,
- JumboostChanger = 50,
- GravityChanger = 196.2,
- PlayerFov = 70,
- HipHeight = 2,
- FPS = 60,
- ZOOM = 10,
- HPMin = 100,
- HPMax = 100
- }
- -- Create the main GUI
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = player:WaitForChild("PlayerGui")
- ScreenGui.Name = "SettingsGui"
- -- Create a draggable frame
- local mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(0, 350, 0, 600)
- mainFrame.Position = UDim2.new(0.5, -175, 0.5, -300)
- mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- mainFrame.BorderSizePixel = 0
- mainFrame.Parent = ScreenGui
- -- Make the frame draggable
- local dragging = false
- local dragInput, mousePos, framePos
- mainFrame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- mousePos = input.Position
- framePos = mainFrame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- mainFrame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - mousePos
- mainFrame.Position = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X, framePos.Y.Scale, framePos.Y.Offset + delta.Y)
- end
- end)
- -- Create a close button
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0, 30, 0, 30)
- closeButton.Position = UDim2.new(1, -35, 0, 5)
- closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- closeButton.Text = "X"
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.TextSize = 18
- closeButton.Parent = mainFrame
- closeButton.MouseButton1Click:Connect(function()
- mainFrame:TweenSizeAndPosition(UDim2.new(0, 0, 0, 0), UDim2.new(0.5, 0, 0.5, 0), "Out", "Quad", 0.5, true, function()
- ScreenGui:Destroy()
- end)
- end)
- -- Create a minimize button
- local minimizeButton = Instance.new("TextButton")
- minimizeButton.Size = UDim2.new(0, 30, 0, 30)
- minimizeButton.Position = UDim2.new(1, -70, 0, 5)
- minimizeButton.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
- minimizeButton.Text = "-"
- minimizeButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- minimizeButton.TextSize = 18
- minimizeButton.Parent = mainFrame
- local minimized = false
- minimizeButton.MouseButton1Click:Connect(function()
- if minimized then
- mainFrame:TweenSize(UDim2.new(0, 350, 0, 600), "Out", "Quad", 0.5, true)
- for _, frame in pairs(mainFrame:GetChildren()) do
- if frame:IsA("Frame") then
- frame.Visible = true
- end
- end
- else
- mainFrame:TweenSize(UDim2.new(0, 350, 0, 50), "Out", "Quad", 0.5, true)
- for _, frame in pairs(mainFrame:GetChildren()) do
- if frame:IsA("Frame") then
- frame.Visible = false
- end
- end
- end
- minimized = not minimized
- end)
- -- Create settings frames
- local function createSettingFrame(name, position)
- local frame = Instance.new("Frame")
- frame.Name = name
- frame.Size = UDim2.new(0, 300, 0, 50)
- frame.Position = position
- frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- frame.BorderSizePixel = 0
- frame.Parent = mainFrame
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(0, 100, 1, 0)
- label.Position = UDim2.new(0, 0, 0, 0)
- label.BackgroundTransparency = 1
- label.Text = name
- label.TextColor3 = Color3.fromRGB(255, 255, 255)
- label.Parent = frame
- local slider = Instance.new("TextBox")
- slider.Name = "Slider"
- slider.Size = UDim2.new(0, 100, 1, 0)
- slider.Position = UDim2.new(0, 110, 0, 0)
- slider.Text = "0"
- slider.TextColor3 = Color3.fromRGB(255, 255, 255)
- slider.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- slider.BorderSizePixel = 0
- slider.Parent = frame
- local input = Instance.new("TextBox")
- input.Name = "Input"
- input.Size = UDim2.new(0, 50, 1, 0)
- input.Position = UDim2.new(1, -50, 0, 0)
- input.Text = defaultValues[name]
- input.TextColor3 = Color3.fromRGB(255, 255, 255)
- input.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- input.BorderSizePixel = 0
- input.Parent = frame
- return frame
- end
- local SpeedChangerFrame = createSettingFrame("SpeedChanger", UDim2.new(0, 25, 0, 50))
- local JumboostChangerFrame = createSettingFrame("JumboostChanger", UDim2.new(0, 25, 0, 110))
- local GravityChangerFrame = createSettingFrame("GravityChanger", UDim2.new(0, 25, 0, 170))
- local PlayerFovFrame = createSettingFrame("PlayerFov", UDim2.new(0, 25, 0, 230))
- local HipHeightFrame = createSettingFrame("HipHeight", UDim2.new(0, 25, 0, 290))
- local FPSFrame = createSettingFrame("FPS", UDim2.new(0, 25, 0, 350))
- local ZOOMFrame = createSettingFrame("ZOOM", UDim2.new(0, 25, 0, 410))
- local function createHPFrame(name, position)
- local frame = Instance.new("Frame")
- frame.Name = name
- frame.Size = UDim2.new(0, 300, 0, 100)
- frame.Position = position
- frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- frame.BorderSizePixel = 0
- frame.Parent = mainFrame
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(0, 100, 1, 0)
- label.Position = UDim2.new(0, 0, 0, 0)
- label.BackgroundTransparency = 1
- label.Text = name
- label.TextColor3 = Color3.fromRGB(255, 255, 255)
- label.Parent = frame
- local minSlider = Instance.new("TextBox")
- minSlider.Name = "MinSlider"
- minSlider.Size = UDim2.new(0, 100, 0.5, 0)
- minSlider.Position = UDim2.new(0, 110, 0, 0)
- minSlider.Text = "0"
- minSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
- minSlider.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- minSlider.BorderSizePixel = 0
- minSlider.Parent = frame
- local maxSlider = Instance.new("TextBox")
- maxSlider.Name = "MaxSlider"
- maxSlider.Size = UDim2.new(0, 100, 0.5, 0)
- maxSlider.Position = UDim2.new(0, 110, 0.5, 0)
- maxSlider.Text = "100"
- maxSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
- maxSlider.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- maxSlider.BorderSizePixel = 0
- maxSlider.Parent = frame
- local input = Instance.new("TextBox")
- input.Name = "Input"
- input.Size = UDim2.new(0, 50, 1, 0)
- input.Position = UDim2.new(1, -50, 0, 0)
- input.Text = defaultValues[name .. "Max"]
- input.TextColor3 = Color3.fromRGB(255, 255, 255)
- input.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- input.BorderSizePixel = 0
- input.Parent = frame
- return frame
- end
- local HPFrame = createHPFrame("HP", UDim2.new(0, 25, 0, 470))
- local function slideIn(frame)
- frame.Position = frame.Position + UDim2.new(1, 0, 0, 0)
- frame:TweenPosition(frame.Position - UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
- end
- local function slideOut(frame)
- frame:TweenPosition(frame.Position + UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true, function()
- frame.Position = frame.Position - UDim2.new(1, 0, 0, 0)
- end)
- end
- slideIn(SpeedChangerFrame)
- slideIn(JumboostChangerFrame)
- slideIn(GravityChangerFrame)
- slideIn(PlayerFovFrame)
- slideIn(HipHeightFrame)
- slideIn(FPSFrame)
- slideIn(ZOOMFrame)
- slideIn(HPFrame)
- local function updatePlayerAttributes(frame)
- local slider = frame:FindFirstChild("Slider")
- local input = frame:FindFirstChild("Input")
- if slider and input then
- local value = tonumber(slider.Text)
- if value then
- input.Text = "Normal" .. frame.Name .. ": " .. value
- if frame.Name == "SpeedChanger" then
- character.Humanoid.WalkSpeed = value
- elseif frame.Name == "JumboostChanger" then
- character.Humanoid.JumpPower = value
- elseif frame.Name == "GravityChanger" then
- game.Workspace.Gravity = value
- elseif frame.Name == "PlayerFov" then
- camera.FieldOfView = value
- elseif frame.Name == "HipHeight" then
- character.Humanoid.HipHeight = value
- elseif frame.Name == "FPS" then
- game:GetService("RunService"):SetFPS(value)
- elseif frame.Name == "ZOOM" then
- camera.FieldOfView = value
- end
- end
- end
- end
- local function updateHPAttributes(frame)
- local minSlider = frame:FindFirstChild("MinSlider")
- local maxSlider = frame:FindFirstChild("MaxSlider")
- local input = frame:FindFirstChild("Input")
- if minSlider and maxSlider and input then
- local minValue = tonumber(minSlider.Text)
- local maxValue = tonumber(maxSlider.Text)
- if minValue and maxValue then
- if minValue == 0 then
- character.Humanoid.Health = 0
- wait(1)
- character:BreakJoints()
- wait(1)
- character.Humanoid.Health = 100
- minSlider.Text = "100"
- input.Text = "HP: 100"
- else
- if maxValue >= 2000 then
- input.Text = "God"
- character.Humanoid.MaxHealth = math.huge
- character.Humanoid.Health = math.huge
- else
- input.Text = "HP: " .. maxValue
- character.Humanoid.MaxHealth = maxValue
- character.Humanoid.Health = maxValue
- end
- end
- end
- end
- end
- local function setupFrame(frame)
- local slider = frame:FindFirstChild("Slider")
- local input = frame:FindFirstChild("Input")
- if slider and input then
- slider.FocusLost:Connect(function()
- updatePlayerAttributes(frame)
- end)
- input.FocusLost:Connect(function()
- local value = tonumber(input.Text:match("%d+"))
- if value then
- slider.Text = value
- updatePlayerAttributes(frame)
- end
- end)
- end
- end
- local function setupHPFrame(frame)
- local minSlider = frame:FindFirstChild("MinSlider")
- local maxSlider = frame:FindFirstChild("MaxSlider")
- local input = frame:FindFirstChild("Input")
- if minSlider and maxSlider and input then
- minSlider.FocusLost:Connect(function()
- updateHPAttributes(frame)
- end)
- maxSlider.FocusLost:Connect(function()
- updateHPAttributes(frame)
- end)
- end
- end
- setupFrame(SpeedChangerFrame)
- setupFrame(JumboostChangerFrame)
- setupFrame(GravityChangerFrame)
- setupFrame(PlayerFovFrame)
- setupFrame(HipHeightFrame)
- setupFrame(FPSFrame)
- setupFrame(ZOOMFrame)
- setupHPFrame(HPFrame)
Advertisement
Comments
-
- i Used Ai for this btw im not that type of Intelligent 🤓
Add Comment
Please, Sign In to add comment
Advertisement