
Key Required
CHOOSE SPEED
Lua Script•113 lines (2799 chars)
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local gui = Instance.new("ScreenGui")
gui.Name = "ChooseSpeedGUI"
gui.ResetOnSpawn = false
gui.Parent = playerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0,260,0,140)
frame.Position = UDim2.new(0.5,-130,0.5,-70)
frame.BackgroundColor3 = Color3.fromRGB(35,35,35)
frame.Parent = gui
local corner = Instance.new("UICorner")
corner.Parent = frame
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1,0,0,35)
title.BackgroundTransparency = 1
title.Text = "CHOOSE SPEED"
title.TextColor3 = Color3.new(1,1,1)
title.Font = Enum.Font.GothamBold
title.TextSize = 22
title.Parent = frame
local box = Instance.new("TextBox")
box.Size = UDim2.new(1,-20,0,35)
box.Position = UDim2.new(0,10,0,50)
box.BackgroundColor3 = Color3.fromRGB(50,50,50)
box.TextColor3 = Color3.new(1,1,1)
box.PlaceholderText = "Enter Speed"
box.ClearTextOnFocus = false
box.TextScaled = true
box.TextWrapped = false
box.ClipsDescendants = true
box.Font = Enum.Font.Gotham
box.Parent = frame
Instance.new("UICorner", box)
box:GetPropertyChangedSignal("Text"):Connect(function()
box.Text = box.Text:gsub("%D","")
end)
local button = Instance.new("TextButton")
button.Size = UDim2.new(1,-20,0,35)
button.Position = UDim2.new(0,10,1,-45)
button.BackgroundColor3 = Color3.fromRGB(0,170,255)
button.TextColor3 = Color3.new(1,1,1)
button.Text = "CHOOSE"
button.Font = Enum.Font.GothamBold
button.TextSize = 18
button.Parent = frame
Instance.new("UICorner", button)
local remote = ReplicatedStorage:WaitForChild("SpeedBoost")
button.MouseButton1Click:Connect(function()
local speed = tonumber(box.Text)
if not speed then
return
end
local args = {
"WalkingSpeedGain",
speed
}
remote:FireServer(unpack(args))
end)
local UIS = game:GetService("UserInputService")
local dragging = false
local dragStart
local startPos
local function update(input)
local delta = input.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
UIS.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch) then
update(input)
end
end)Features & Information
CHOOSE YOUR SPEED
Community Comments (0)
No comments yet for this script.
