The script works fine, but when a player level is levels up like player is 24 and gets 25 it still keeps putting the gui up when it have to stop putting the gui up. How to fix it? I did put a green line text to everything.
Since the functions everything works better then my prevous onces. But now I only have that problem. I think i need a way to keep checking what level the player is.
game.Players.PlayerAdded:wait()
local player = game.Players.LocalPlayer
wait(2)
function bigger () --if bigger then 0
player.leaderstats.Level.Value = player.leaderstats.Level.Value >= 0
end
function smaller () -- if bigger then 25 it won't work for them
player.leaderstats.Level.Value = player.leaderstats.Level.Value >= 25
end
function level () -- function of level
if bigger then -- if its bigger then 0 it wil get ready the gui
local GuiEvent = script:findFirstChild("Easy"):Clone()
GuiEvent.Parent = player.PlayerGui
elseif smaller then -- if its bigger then 25 nothing hqs to happen
print("level to high")
end
end
while true do
local Players = game:GetService("Players")
Choos = math.random(1)
wait(15)
if Choos == 1 then -- event 1
wait(2)
if level (smaller) then
print("Moving to hard")
elseif level (bigger) then
print("Playing")
end
wait(21)
end
end
Thanks

5 comments
Your leaderboard is not working I mean the function bigger and smaller you always get the gui even if you delete line 6 and 9.
How to fix this?
I don't know, someone else must help you
What do you -think- your script does?
Look below I made a fix for you