0% found this document useful (0 votes)
29 views2 pages

Aimlock WalkSpeed Slider Script

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)
29 views2 pages

Aimlock WalkSpeed Slider Script

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

local player = [Link].

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

local screenGui = [Link]("ScreenGui")


[Link] = playerGui

local sliderFrame = [Link]("Frame")


[Link] = [Link](0, 400, 0, 20)
[Link] = [Link](0.5, -200, 0.9, -30)
sliderFrame.BackgroundColor3 = [Link](50, 50, 50)
[Link] = screenGui

local sliderBar = [Link]("Frame")


[Link] = [Link](1, 0, 0.5, 0)
[Link] = [Link](0, 0, 0.25, 0)
sliderBar.BackgroundColor3 = [Link](100, 100, 100)
[Link] = sliderFrame

local sliderHandle = [Link]("ImageButton")


[Link] = [Link](0, 20, 1, 0)
[Link] = [Link](0, 0, 0, 0)
sliderHandle.BackgroundColor3 = [Link](255, 0, 0)
[Link] = ""
[Link] = sliderFrame

local walkSpeedLabel = [Link]("TextLabel")


[Link] = [Link](0, 200, 0, 50)
[Link] = [Link](0.5, -100, 0.8, -50)
[Link] = 1
walkSpeedLabel.TextColor3 = [Link](255, 255, 255)
[Link] = true
[Link] = [Link]
[Link] = "WalkSpeed: 16"
[Link] = screenGui

local isDragging = false

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

game:GetService("UserInputService").InputEnded:Connect(function(input)
if [Link] == [Link].MouseButton1 then
isDragging = false
end
end)

game:GetService("RunService").RenderStepped:Connect(function()
if isDragging then
local mousePos = game:GetService("UserInputService"):GetMouseLocation().X
local sliderPos = [Link].X
local sliderSize = [Link].X
local relativePos = [Link]((mousePos - sliderPos) / sliderSize, 0, 1)
[Link] = [Link](relativePos, -10, 0, 0)
local walkSpeed = [Link](relativePos * 1000)
[Link] = "WalkSpeed: " .. walkSpeed
local character = [Link] or [Link]:Wait()
local humanoid = character:WaitForChild("Humanoid")
[Link] = walkSpeed
end
end)

You might also like