Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if b.Name == v then
- local Goal = b:WaitForChild("ProgressHolder"):WaitForChild("Goal")
- local Amount = string.match(Goal.Text, "%d+")
- if game:GetService("ServerStorage"):FindFirstChild(Player.UserId) == nil then
- local PlayerFolder = Instance.new("Folder")
- PlayerFolder.Name = Player.UserId
- PlayerFolder.Parent = game:GetService("ServerStorage")
- local ChallengeGoals = Instance.new("Folder")
- ChallengeGoals.Name = "ChallengeGoals"
- ChallengeGoals.Parent = PlayerFolder
- local Template = Instance.new("Folder")
- Template.Name = v
- Template.Parent = ChallengeGoals
- local AmountV = Instance.new("IntValue")
- AmountV.Name = "Amount"
- AmountV.Value = Amount
- AmountV.Parent = Template
- else
- local PlayerFolder = game:GetService("ServerStorage"):FindFirstChild(Player.UserId)
- if PlayerFolder then
- local ChallengeGoals = PlayerFolder:FindFirstChild("ChallengeGoals")
- local Temp = ChallengeGoals:WaitForChild(b.Name)
- local AmountV = Temp:WaitForChild("Amount")
- AmountV.Value = Amount
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement