I have made a speed change script
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local wins = player.leaderstats.Wins local value = 10 wins.Changed:Connect(function() humanoid.WalkSpeed = humanoid.WalkSpeed + value end)
LocalScript (ClientScript)
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local wins = player.leaderstats.Wins local value = 10 wins:GetPropertyChangedSignal('Value'):Connect(function() humanoid.WalkSpeed = humanoid.WalkSpeed + (value * wins.Value) / 2 end)
ServerScript (Script)
--< Services local PlayerService = game:GetService('Players') local RStorageService = game:GetService('ReplicatedStorage') local DataStoreService = game:GetService('DataStoreService') --< Variables local DataStore = DataStoreService:GetDataStore('Datas') --< Events PlayerService.PlayerAdded:Connect(function(player) local l = Instance.new('Folder', player) l.Name = 'leaderstats' local w = Instance.new('IntValue', l) w.Name = 'Wins' w.Value = DataStore:GetAsync(player.UserId) or 0 end) PlayerService.PlayerRemoving:Connect(function(player) if player:FindFirstChild('leaderstats') then DataStore:SetAsync(player.UserId, player.leaderstats.Wins.Value) end end)
Hope this help, to more questions put bellow in commentaries.