Roblox

Aug 26, 2022 18:55


1) валюта для симулятора:
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player

local subs = Instance.new("IntValue")
subs.Name = "Ameralds"
subs.Value = 0
subs.Parent = leaderstats
local subs = Instance.new("IntValue")
subs.Name = "Points"
subs.Value = 0
subs.Parent = leaderstats

end)

2) скрипт собирания:

script.Parent.Touched:Connect(function (hit)

local player = hit.Parent:FindFirstChild("Humanoid")
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.leaderstats.Points.Value >= 0 then
wait()
script.Disabled = true
script.Parent.Transparency = 1
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value +1
wait (5)
script.Parent.Transparency = 0
script.Disabled = false
end
end)

Previous post
Up