Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- you can make a gui to show all these values
- game.Players.PlayerAdded:Connect(function(plr)
- local plrStats = Instance.new("Folder", plr)
- plrStats.Name = "plrStats"
- local affinityTable = {"Water", "Earth", "Fire", "Air"}
- local affinityStat = Instance.new("StringValue", plrStats)
- affinityStat.Name = "Affinity"
- function generateAffinity()
- return affinityTable[math.random(1,#affinityTable)]
- end
- affinityStat.Value = (generateAffinity())
- local defenceStat = Instance.new("NumberValue", plrStats)
- defenceStat.Name = "Defence"
- defenceStat.Value = math.random(0, 100)
- local strengthStat = Instance.new("NumberValue", plrStats)
- strengthStat.Name = "Strength"
- strengthStat.Value = math.random(0, 100)
- local speedStat = Instance.new("NumberValue", plrStats)
- speedStat.Name = "Speed"
- speedStat.Value = math.random(0, 100)
- local magicpowerStat = Instance.new("NumberValue", plrStats)
- magicpowerStat.Name = "MagicPower"
- magicpowerStat.Value = math.random(0, 100)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement