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

From Legacy Roblox Wiki
Jump to navigationJump to search
>Tomtomn00
>Tomtomn00
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
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.
 
This includes some of the game scripts that anyone can use if you like.
<center>
<center>
{{EmphasisBox/start|red}}
{{EmphasisBox/start|red}}
Line 13: Line 13:
----
----


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


==Stat-Give for when you kill a monster==
==Stat-Give for when you kill a monster==
<pre>
<pre>
local Humanoid = script.Parent.Enemy
local Humanoid = script.Parent.Enemy -- Monsters' Humanoid
function PwntX_X()  
function PwntX_X()  
local tag = Humanoid:findFirstChild("creator")  
local tag = Humanoid:findFirstChild("creator")  
Line 24: Line 24:
local Leaderstats = tag.Value:findFirstChild("leaderstats")  
local Leaderstats = tag.Value:findFirstChild("leaderstats")  
if Leaderstats ~= nil then  
if Leaderstats ~= nil then  
Leaderstats.Gold.Value = Leaderstats.Gold.Value + 20
Leaderstats.Gold.Value = Leaderstats.Gold.Value + 20 -- Money giver
wait(0.1)
wait(0.1)
script:remove()
script:remove()
Line 33: Line 33:
Humanoid.Died:connect(PwntX_X)  
Humanoid.Died:connect(PwntX_X)  


local Humanoid = script.Parent.Enemy
local Humanoid = script.Parent.Enemy -- Monsters' Humanoid
function PwntX_X()  
function PwntX_X()  
local tag = Humanoid:findFirstChild("creator")
local tag = Humanoid:findFirstChild("creator")
Line 40: Line 40:
local Leaderstats = tag.Value:findFirstChild("leaderstats")
local Leaderstats = tag.Value:findFirstChild("leaderstats")
if Leaderstats ~= nil then
if Leaderstats ~= nil then
Leaderstats.EXP.Value = Leaderstats.EXP.Value + 20
Leaderstats.EXP.Value = Leaderstats.EXP.Value + 20 -- EXP giver
wait(0.1)
wait(0.1)
script:remove()
script:remove()

Latest revision as of 20:06, 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. This includes some of the game scripts that anyone can use if you like.

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 -- Monsters' Humanoid
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 -- Money giver
wait(0.1)
script:remove()
			end 
		end 
	end 
end 
Humanoid.Died:connect(PwntX_X) 

local Humanoid = script.Parent.Enemy -- Monsters' Humanoid
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 -- EXP giver
wait(0.1)
script:remove()
			end
		end
	end
end
Humanoid.Died:connect(PwntX_X)