Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local skillsFolder = plr:WaitForChild("SkillsFolder")
- for i, skill in pairs(skillsFolder:GetChildren()) do
- if skill.Name ~= "SkillPoints" then
- local clone = script.SkillType:Clone()
- clone.Text = skill.Name .. ": " .. skill.Value
- clone.Parent = script.Parent.SkillTypes
- skill:GetPropertyChangedSignal("Value"):Connect(function()
- clone.Text = skill.Name .. ": " .. skill.Value
- end)
- clone.IncreaseButton.MouseButton1Click:Connect(function()
- game.ReplicatedStorage.OnPointBought:FireServer(skill.Name)
- end)
- elseif skill.Name == "SkillPoints" then
- script.Parent.PointsAmount.Text = "POINTS: " .. skill.Value
- skill:GetPropertyChangedSignal("Value"):Connect(function()
- script.Parent.PointsAmount.Text = "POINTS: " .. skill.Value
- end)
- end
- end
- script.Parent.Parent.OpenButton.MouseButton1Click:Connect(function()
- script.Parent.Visible = not script.Parent.Visible
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement