User:Tomtomn00/Tale of the Tommy: RPG: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Tomtomn00 No edit summary |
>Tomtomn00 No edit summary |
||
Line 1: | Line 1: | ||
=Info= | |||
This is one of the projects to go on my profile. | This is one of the projects to go on my profile. | ||
I am creating this game of mine, it will be finished soon. | I am creating this game of mine, it will be finished soon. | ||
Line 10: | Line 11: | ||
{{EmphasisBox/end}} | {{EmphasisBox/end}} | ||
</center> | </center> | ||
---- | |||
=Scripts= | |||
==Stat-Give for when you kill a monster== | |||
<pre> | |||
local Humanoid = script.Parent.Enemy | |||
function PwntX_X() | |||
local tag = Humanoid:findFirstChild("creator") | |||
if tag ~= nil then | |||
if tag.Value ~= nil then | |||
local Leaderstats = tag.Value:findFirstChild("leaderstats") | |||
if Leaderstats ~= nil then | |||
Leaderstats.Gold.Value = Leaderstats.Gold.Value + 20 | |||
wait(0.1) | |||
script:remove() | |||
end | |||
end | |||
end | |||
end | |||
Humanoid.Died:connect(PwntX_X) | |||
local Humanoid = script.Parent.Enemy | |||
function PwntX_X() | |||
local tag = Humanoid:findFirstChild("creator") | |||
if tag ~= nil then | |||
if tag.Value ~= nil then | |||
local Leaderstats = tag.Value:findFirstChild("leaderstats") | |||
if Leaderstats ~= nil then | |||
Leaderstats.EXP.Value = Leaderstats.EXP.Value + 20 | |||
wait(0.1) | |||
script:remove() | |||
end | |||
end | |||
end | |||
end | |||
Humanoid.Died:connect(PwntX_X) | |||
</pre> |
Revision as of 20:03, 9 July 2011
Info
This is one of the projects to go on my profile. I am creating this game of mine, it will be finished soon.
RPG Logo: File:RPG-Tale of The Tommy LOGO.png RPG Spawn Location Design: File:Tottrpgspawn.png
Scripts
Stat-Give for when you kill a monster
local Humanoid = script.Parent.Enemy function PwntX_X() local tag = Humanoid:findFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then local Leaderstats = tag.Value:findFirstChild("leaderstats") if Leaderstats ~= nil then Leaderstats.Gold.Value = Leaderstats.Gold.Value + 20 wait(0.1) script:remove() end end end end Humanoid.Died:connect(PwntX_X) local Humanoid = script.Parent.Enemy function PwntX_X() local tag = Humanoid:findFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then local Leaderstats = tag.Value:findFirstChild("leaderstats") if Leaderstats ~= nil then Leaderstats.EXP.Value = Leaderstats.EXP.Value + 20 wait(0.1) script:remove() end end end end Humanoid.Died:connect(PwntX_X)