User:Tomtomn00/Tale of the Tommy: RPG: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Tomtomn00
>Tomtomn00
Line 13: Line 13:
----
----


=Scripts=
='''Scripts'''=


==Stat-Give for when you kill a monster==
==Stat-Give for when you kill a monster==

Revision as of 20:04, 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)