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: No.

Previous Thread :: Next Thread 
JJ71599 is not online. JJ71599
Joined: 16 Jan 2009
Total Posts: 2963
19 Nov 2012 05:33 PM
I need a script for gamepasses, alright so you know VIP doors? I want a VIP door script linked up to a gamepass so like if you own it you gain entrance.

Thanks, and it must be working i'll pay whoever can make a successful one.

-JJ
Report Abuse
reflicted is not online. reflicted
Joined: 07 Nov 2012
Total Posts: 265
19 Nov 2012 05:35 PM
Tis place isnt for requests. -.-


*TITLE FIX*

~ This is a signature :P ~
Report Abuse
BCtoTBCtoOBC12 is not online. BCtoTBCtoOBC12
Joined: 24 Jun 2012
Total Posts: 725
19 Nov 2012 05:52 PM
Yes, what kind? PM me
Report Abuse
mattandjeffhardy619 is not online. mattandjeffhardy619
Joined: 21 Jul 2008
Total Posts: 510
19 Nov 2012 05:54 PM
There is already a model of this that ROBLOX made...
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Nov 2012 08:44 PM
--------------------
--| WaitForChild |--
--------------------

-- Waits for parent.child to exist, then returns it
local function WaitForChild(parent, childName)
assert(parent, "ERROR: WaitForChild: parent is nil")
while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
return parent[childName]
end

-----------------
--| Variables |--
-----------------

local GamePassService = Game:GetService('GamePassService')
local PlayersService = Game:GetService('Players')

local VipDoor = script.Parent

local GamePassIdObject = WaitForChild(script, 'GamePassId')

local JustTouched = {}

-----------------
--| Functions |--
-----------------

-- Finds out which side the player is on and teleports them to the other
local function TeleportToOtherSide(character, hitPart)
local bottomOfDoor = VipDoor.CFrame.p - Vector3.new(0, VipDoor.Size.Y / 2, 0)
local inFrontOfDoor = bottomOfDoor + VipDoor.CFrame.lookVector * 3
local behindDoor = bottomOfDoor - VipDoor.CFrame.lookVector * 3

local distanceToFront = (inFrontOfDoor - hitPart.Position).magnitude
local distanceToBack = (behindDoor - hitPart.Position).magnitude
if distanceToFront < distanceToBack then
character:MoveTo(behindDoor)
else
character:MoveTo(inFrontOfDoor)
end
end

-- When a player with the game pass touches the door, teleport them to the other side
local function OnTouched(otherPart)
if otherPart and otherPart.Parent and otherPart.Parent:FindFirstChild('Humanoid') then
local player = PlayersService:GetPlayerFromCharacter(otherPart.Parent)
if player and not JustTouched[player] then
JustTouched[player] = time()
if GamePassService:PlayerHasPass(player, GamePassIdObject.Value) then
TeleportToOtherSide(player.Character, otherPart)
end
end
end
end

-- Removes old entries in JustTouched
local function RemoveOldTouches()
for player, touchTime in pairs(JustTouched) do
if time() > touchTime + 0.3 then
JustTouched[player] = nil
end
end
end

--------------------
--| Script Logic |--
--------------------

VipDoor.Touched:connect(OnTouched)

while true do
RemoveOldTouches()
wait(1/30)
end


Inside this make a IntValue Named "GamePassId" without the quets, then put the game pass ID as its value GIMIE MEH REWARD NAO
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 10:18 PM
jokes on u he isn't paying
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
22 Nov 2012 10:48 AM
so.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
22 Nov 2012 10:56 AM
No request in this forum


Take request to LMaD
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
22 Nov 2012 10:58 AM
He already completed the script.
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