Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local Player = Players.LocalPlayer
- local WalkSpeedValue = 50 -- 원하는 속도 값 (기본값: 50)
- -- 속도 변경 함수
- local function SetSpeed()
- if Player.Character then
- local humanoid = Player.Character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- humanoid.WalkSpeed = WalkSpeedValue
- end
- end
- end
- -- 캐릭터 생성될 때 속도 적용
- if Player.Character then
- SetSpeed()
- end
- Player.CharacterAdded:Connect(SetSpeed)
- -- 모든 키 입력 감지 (Shift 포함!)
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if not gameProcessed then
- SetSpeed()
- end
- end)
- UserInputService.InputEnded:Connect(function(input, gameProcessed)
- if not gameProcessed then
- SetSpeed()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment