I have been working a lot to make a game that has several teams and seperate ranks in each team. It would kind of be like SCP:RP or something alike.
In this case, it is for a Military RP. I need at least four teams and the possibility to create more teams with their own ranks in the future!
I have heard a lot about using IntValues, but I cannot seem to figure out what that means. Any help is very appreciated!
-# (If you are someone who make these codes for free, please do contact me and I we can talk!)
Here are my most successful scripts so far:
leaderstats (ranks and required XP) script:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local Rank = Instance.new("StringValue", leaderstats)
Rank.Name = "Rank"
Rank.Value = "PVT"
local level = Instance.new("IntValue", Rank)
level.Name = "Level"
level.Value = 1
local exp = Instance.new("IntValue", player)
exp.Name = "Exp"
exp.Value = 0
local requiredEXP = Instance.new("IntValue", player)
requiredEXP.Name = "requiredExp"
requiredEXP.Value = 1000
exp.Changed:Connect(function()
if exp.Value >= requiredEXP.Value then
if level.Value < 10 then
exp.Value = exp.Value - requiredEXP.Value
level.Value = level.Value + 1
if level.Value == 2 then
Rank.Value = "PFC"
requiredEXP.Value = 2500
elseif level.Value == 3 then
Rank.Value = "SPC"
requiredEXP.Value = 4500
elseif level.Value == 4 then
Rank.Value = "CPL"
requiredEXP.Value = 7000
elseif level.Value == 5 then
Rank.Value = "SGT"
requiredEXP.Value = 10000
elseif level.Value == 6 then
Rank.Value = "SFC"
requiredEXP.Value = 13500
elseif level.Value == 7 then
Rank.Value = "MSG"
requiredEXP.Value = 17500
elseif level.Value == 8 then
Rank.Value = "FSG"
requiredEXP.Value = 22000
elseif level.Value == 9 then
Rank.Value = "SGM"
requiredEXP.Value = 27000
elseif level.Value == 10 then
Rank.Value = "CSM"
end
end
end
end)
end)
With this script I also added a few "buttons" that gave XP when walked on.
What I need, however, is a script that gives XP over time instead of after an action has been made - like walking on an object.
** You are now Level 1! **