Main Search
Delta Corp Forum Index
 
 
FAQ Members Groups Profile Private Messages

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact [email protected].
Whats Wrong?

 
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
freaked
Beginner Poster


Joined: 26 May 2008
Posts: 20

PostPosted: Sat May 31, 2008 2:44 am    Post subject: Whats Wrong? Reply with quote

Whats wrong with this Script? I want it when touched, it will give you a weapon and will teleport to teleporter2d.

-- Mini Shop by BouyertheDestroyer -- January 2008
amnt = 20 -- Cost.
local weapon = game.Lighting.Snipe-- Are you familiar with the Lighting Hack?
function onTouched(part)
local H = part.Parent:findFirstChild("Message")
if (H==nil) then
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("KOs")
if (score~=nil) then -- Do not Edit anything after this except for the text.
if (score.Value <amnt> amnt - 1) then
score.Value = score.Value - amnt
weapon:clone().Parent = thisplr
local Hint = Instance.new("Hint")
Hint.Parent = part.Parent
Hint.Text = "You just purchased a"
script.Parent.BrickColor = BrickColor.new(37)
wait(1)
Hint.Text = weapon.Name
script.Parent.BrickColor = BrickColor.new(26)
wait(1)
Hint.Text = "For"
wait(1)
Hint.Text = amnt
wait(1)
Hint.Text = "KOs"
wait(1)
Hint.Text = "You have"
wait(1)
Hint.Text = score.Value.." KOs"
wait(1)
Hint.Text = "Left"
wait(1)
Hint:remove()
end
end
end
end
end
end
end

script.Parent.Touched:connect(onTouched)

------------------------------------
modelname="teleporter2d"
------------------------------------

function onTouched(part)
if part.Parent ~= nil then
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
local teleportfrom=script.Parent.Enabled.Value
if teleportfrom~=0 then
if h==humanoid then
return
end
local teleportto=script.Parent.Parent:findFirstChild(modelname)
if teleportto~=nil then
local torso = h.Parent.Torso

script.Parent.Enabled.Value=0
teleportto.Enabled.Value=0
torso.Parent:MoveTo(teleportto.Position) -- + Vector3.new(math.random(1,3),math.random(1,3),math.random(1,3)
wait(3)
script.Parent.Enabled.Value=1
teleportto.Enabled.Value=1
else
print("Could not find teleporter!")
end
end
end
end
end

script.Parent.Touched:connect(onTouched)
_________________


http://robloxhub.wordpress.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Back to Top              
Jenova Template © digital-delusion.com
Powered by phpBB © 2001, 2002 phpBB Group



For Support - http://forums.BizHat.com

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!