В этом видео я показал как получать деньги за киллы в роблокс студио! Или за соприкосновение с партом!
==========================================================================================================================
Скрипт деньги за прикосновение к блоку:
amnt = 10
function onTouched(Part)
local h = Part.Parent:FindFirstChild("Humanoid")
if (h ~=nil) then
local thisplr = game.Players:FindFirstChild(h.Parent.Name)
if (thisplr~= nil) then
local stats = thisplr:FindFirstChild("leaderstats")
if (stats~= nil) then
local score = stats:FindFirstChild("Coins")
if (score~=nil) then
score.Value = score.Value +amnt
end
end
end
end
end
script.Parent.Touched:Connect(onTouched)
==========================================================================================================================Скрипт Для получения денег за убийство:
local Humanoid = script.Parent.Humanoid
function frag()
local Val = Humanoid:FindFirstChild("creator") and Humanoid.creator.Value
if Val then
local leaderstats = Val:FindFirstChild("leaderstats")
leaderstats.Coins.Value = leaderstats.Coins.Value + 100
script.Remove()
end
end
Humanoid.Died:connect(frag)
========================================================================================================================
Негізгі бет Как Получать Деньги За Киллы В Роблокс Студио? Гайд
Пікірлер: 5