KEMBAR78
Message | PDF
0% found this document useful (0 votes)
25 views2 pages

Message

Uploaded by

simkolev10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Message

Uploaded by

simkolev10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

local player = game.Players.

LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local screenGui = Instance.new("ScreenGui")


screenGui.Parent = playerGui

local sliderFrame = Instance.new("Frame")


sliderFrame.Size = UDim2.new(0, 400, 0, 20)
sliderFrame.Position = UDim2.new(0.5, -200, 0.9, -30)
sliderFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
sliderFrame.Parent = screenGui

local sliderBar = Instance.new("Frame")


sliderBar.Size = UDim2.new(1, 0, 0.5, 0)
sliderBar.Position = UDim2.new(0, 0, 0.25, 0)
sliderBar.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
sliderBar.Parent = sliderFrame

local sliderHandle = Instance.new("ImageButton")


sliderHandle.Size = UDim2.new(0, 20, 1, 0)
sliderHandle.Position = UDim2.new(0, 0, 0, 0)
sliderHandle.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
sliderHandle.Image = ""
sliderHandle.Parent = sliderFrame

local walkSpeedLabel = Instance.new("TextLabel")


walkSpeedLabel.Size = UDim2.new(0, 200, 0, 50)
walkSpeedLabel.Position = UDim2.new(0.5, -100, 0.8, -50)
walkSpeedLabel.BackgroundTransparency = 1
walkSpeedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
walkSpeedLabel.TextScaled = true
walkSpeedLabel.Font = Enum.Font.SourceSansBold
walkSpeedLabel.Text = "WalkSpeed: 16"
walkSpeedLabel.Parent = screenGui

local isDragging = false

sliderHandle.MouseButton1Down:Connect(function()
isDragging = true
end)

game:GetService("UserInputService").InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
isDragging = false
end
end)

game:GetService("RunService").RenderStepped:Connect(function()
if isDragging then
local mousePos = game:GetService("UserInputService"):GetMouseLocation().X
local sliderPos = sliderFrame.AbsolutePosition.X
local sliderSize = sliderFrame.AbsoluteSize.X
local relativePos = math.clamp((mousePos - sliderPos) / sliderSize, 0, 1)
sliderHandle.Position = UDim2.new(relativePos, -10, 0, 0)
local walkSpeed = math.floor(relativePos * 1000)
walkSpeedLabel.Text = "WalkSpeed: " .. walkSpeed
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
humanoid.WalkSpeed = walkSpeed
end
end)

You might also like