generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Modified Script

Previous Thread :: Next Thread 
JayTheDJ is online. JayTheDJ
Joined: 07 Aug 2011
Total Posts: 262
09 Aug 2012 02:29 PM
"toto Money Door!" (Read green Text 4 information to perfect it for your personal place!)
print("Koopa'sKickBottomKickOpenDoorScript")

Door = script.Parent
local debounce = false

function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end


function onTouched(hit)
if debounce == false then

local human = hit.Parent:findFirstChild("Humanoid")
if (human == nil) then return end

local player = getPlayer(human)

debounce = true
if (player == nil) then return end
local stats = player:findFirstChild("leaderstats") --(Finds on scoreboard.)
local sp = stats:findFirstChild("EduPoints") --searches for number of cashowned by person who touched door in Leaderboard.
if sp == nil then return false end
if (sp.Value >= 0) then
sp.Value = sp.Value + 20 --How much it costs to get through. (Replace (1000) With new cost to go through door.
print("Enough Cash")--checks if you have 1000 OR MORE.
Door.Transparency = .5
Door.CanCollide = false
wait(1)-- How long it stays open. CAREFUL!! People can sneak in. Suggested for 3 seconds.(Default.)
Door.CanCollide = true--Note that if they don't have enough cash, it don't let them through, but dosen't kill them.
Door.Transparency = 0 --note that if they have enough, it subtracts the number needed to get though.
debounce = false --IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

end --This door is ment for uses like the following: To make it so they can get to Nme Changer(On other side of door.) So they can change their name to yours while IN GAME OLNY!! To get into an Admin Door, to get a special idem of some sort. Inf hp, special weapon,Ect.
end

end

connection = Door.Touched:connect(onTouched)




What I wanted is when you touch it instead of it taking away points, I wanted it to give points.
Report Abuse
liningpuma is not online. liningpuma
Joined: 26 Dec 2011
Total Posts: 69
09 Aug 2012 02:38 PM
Hi!

I don't get this script.
What and what does this script do in your place?

-Liningpuma
Report Abuse
JayTheDJ is online. JayTheDJ
Joined: 07 Aug 2011
Total Posts: 262
09 Aug 2012 02:41 PM
The script is this, it is a door, where if you have enough EduPoints, you may go though the door. Like how RPG games, if you have enough Experience, you can go to the next level with a door.
Report Abuse
liningpuma is not online. liningpuma
Joined: 26 Dec 2011
Total Posts: 69
09 Aug 2012 02:42 PM
Oh neet!

Could you PM or reply to my thread " Emergency " And reply with a good script thats fun with and its fun to play with or something ?
Report Abuse
JayTheDJ is online. JayTheDJ
Joined: 07 Aug 2011
Total Posts: 262
09 Aug 2012 02:45 PM
Here is the original Script.

print("Koopa'sKickBottomKickOpenDoorScript")

Door = script.Parent
local debounce = false

function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end


function onTouched(hit)
if debounce == false then

local human = hit.Parent:findFirstChild("Humanoid")
if (human == nil) then return end

local player = getPlayer(human)

debounce = true
if (player == nil) then return end
local stats = player:findFirstChild("leaderstats")
local sp = stats:findFirstChild("EduPoints")
if sp == nil then return false end
if (sp.Value >= 0) then
print("Enough Points")
Door.Transparency = .5
Door.CanCollide = false
wait(0.2)
Door.CanCollide = true
Door.Transparency = 0
debounce = false

end
end

end

connection = Door.Touched:connect(onTouched)


How do I modify it if I want to add points if you have more or equal to Zero?
Report Abuse
liningpuma is not online. liningpuma
Joined: 26 Dec 2011
Total Posts: 69
09 Aug 2012 02:46 PM
No, i wasnt gonna help you with the script i was just asking if you could reply to my thread with the Master Hand Script. :3
Report Abuse
JayTheDJ is online. JayTheDJ
Joined: 07 Aug 2011
Total Posts: 262
09 Aug 2012 02:51 PM
Anyone else can help?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image