message (2)
message (2)
local Speed = 20
local Enabled = true
local UIVisible = true
-- UI Setup
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "SpeedControlUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")
-- Rounded corners
local corner = Instance.new("UICorner", mainFrame)
corner.CornerRadius = UDim.new(0, 12)
-- Script Title
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 30)
title.Position = UDim2.new(0, 0, 0, 30)
title.BackgroundTransparency = 1
title.Text = "Inf Stam Script - @kamani94"
title.Font = Enum.Font.GothamBold
title.TextSize = 16
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextXAlignment = Enum.TextXAlignment.Center
title.Parent = overlay
-- Speed Input
local speedBox = Instance.new("TextBox")
speedBox.Size = UDim2.new(0.8, 0, 0, 35)
speedBox.Position = UDim2.new(0.1, 0, 0.25, 0)
speedBox.PlaceholderText = "Enter speed"
speedBox.Text = tostring(Speed)
speedBox.Font = Enum.Font.Gotham
speedBox.TextSize = 16
speedBox.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
speedBox.TextColor3 = Color3.fromRGB(255, 255, 255)
speedBox.Parent = overlay
Instance.new("UICorner", speedBox).CornerRadius = UDim.new(0, 8)
-- Recommended value
local recommendLabel = Instance.new("TextLabel")
recommendLabel.Size = UDim2.new(1, 0, 0, 20)
recommendLabel.Position = UDim2.new(0, 0, 0.42, 0)
recommendLabel.BackgroundTransparency = 1
recommendLabel.Text = "Recommended value: 2 or 3"
recommendLabel.Font = Enum.Font.Gotham
recommendLabel.TextSize = 14
recommendLabel.TextColor3 = Color3.fromRGB(200, 255, 200)
recommendLabel.TextXAlignment = Enum.TextXAlignment.Center
recommendLabel.Parent = overlay
-- Toggle Button
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0.8, 0, 0, 35)
toggleButton.Position = UDim2.new(0.1, 0, 0.55, 0)
toggleButton.BackgroundColor3 = Color3.fromRGB(50, 200, 100)
toggleButton.Text = "Enabled"
toggleButton.Font = Enum.Font.GothamBold
toggleButton.TextSize = 16
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.Parent = overlay
Instance.new("UICorner", toggleButton).CornerRadius = UDim.new(0, 10)
-- Toggle logic
local function updateToggle()
if Enabled then
toggleButton.Text = "Enabled"
toggleButton.BackgroundColor3 = Color3.fromRGB(50, 200, 100)
else
toggleButton.Text = "Disabled"
toggleButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
end
end
toggleButton.MouseButton1Click:Connect(function()
Enabled = not Enabled
updateToggle()
end)
updateToggle()
discordLabel.MouseButton1Click:Connect(function()
if setclipboard then
setclipboard("https://discord.gg/jaBa5x5xa5")
discordLabel.Text = "Copied Discord link!"
task.wait(1.5)
discordLabel.Text = "Discord: https://discord.gg/jaBa5x5xa5"
end
end)
-- Toggle UI instruction
local toggleHint = Instance.new("TextLabel")
toggleHint.Size = UDim2.new(1, 0, 0, 20)
toggleHint.Position = UDim2.new(0, 0, 0.88, 0)
toggleHint.BackgroundTransparency = 1
toggleHint.Text = "Press 0 to hide/show UI"
toggleHint.Font = Enum.Font.GothamBold
toggleHint.TextSize = 14
toggleHint.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleHint.TextXAlignment = Enum.TextXAlignment.Center
toggleHint.Parent = overlay
-- Show/hide logic
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.Zero then
UIVisible = not UIVisible
screenGui.Enabled = UIVisible
end
end)
-- Movement logic
RunService.Heartbeat:Connect(function()
if not Enabled then return end