Answered by
8 years ago Edited 8 years ago
As M39a9m3R said, the code updates itself into a continuous loop.
I'm going to suggest a Debounce
because I know no other way, but I'm sure there are more.
A debounce is a variable
used to stop code from running multiple times in a row. To add a debounce would make your code look somewhat like this,
01 | local v = game.Players.LocalPlayer |
03 | if v.Name = = "Player1" or game:GetService( "MarketplaceService" ):PlayerOwnsAsset(v, 440723046 ) = = true then |
04 | if v:FindFirstChild( 'leaderstats' ) then |
05 | if v.leaderstats:FindFirstChild( 'XP' ) then |
06 | v.leaderstats.XP.Changed:connect( function (z) |
07 | if Debounce then return end |
09 | v.leaderstats.XP.Value = v.leaderstats.XP.Value + 25 * workspace.Scripts.Multiplier.Value |
Wait time could possible be shortened, or may need to be longer.
That was a short was of, hopefully, fixing your code.
I hope I helped.
Good Luck.
If I did help, don't forget to accept my answer.