Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:26 AM |
IDK how to make it be like "would you like to by the VIP lounge gamepass" when they try going to the VIP door, how do i make it do that?
[I CANT SCRIPT LUA] |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:27 AM |
| http://wiki.roblox.com/index.php?title=PromptPurchase |
|
|
| Report Abuse |
|
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:29 AM |
-------------------- --| 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
id = 92997034 function onTouch(hit) if hit.Parent.Humanoid ~= nil then local player = game.Players:getPlayerFromCharacter(hit.Parent) game:GetService("MarketplaceService"):PromptPurchase(player, id) end end script.Parent.Touched:connect(onTouched)
didnt work |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:29 AM |
| where did you get that from |
|
|
| Report Abuse |
|
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:30 AM |
thats how to do it right? ITS NOT WORKING :(
|
|
|
| Report Abuse |
|
|
| |
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:32 AM |
idk how to find it here wtf
i script python and js
not lua |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:33 AM |
Studio>View>Output then look for the red error |
|
|
| Report Abuse |
|
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:35 AM |
it doesnt say one x_x
how much would someone on this forum charge for a VIP door that once you buy a gamepass, you can go through. also if you dont have it, and you try going through, it prompts you |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:36 AM |
well if there's no error its obviously not working and idk if anyone on this forum does script for pay, not me |
|
|
| Report Abuse |
|
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:37 AM |
-____________-
teamkilled can you help me out :( i helped you out when you needed that thing for auto promotion or w/e so i added you to a chat with alex
-_-
qq
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:38 AM |
| oh just realized who you are |
|
|
| Report Abuse |
|
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:38 AM |
| can you halp b4 i cry and smash my laptop |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:39 AM |
| OP asked this in C&G >________> |
|
|
| Report Abuse |
|
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
|
| 16 Aug 2015 12:40 AM |
| reoccuring shut the hell up idiot |
|
|
| Report Abuse |
|
|
Dbaffled
|
  |
| Joined: 15 Jul 2015 |
| Total Posts: 743 |
|
| |
|
76km
|
  |
| Joined: 14 Aug 2015 |
| Total Posts: 5455 |
|
|
| 16 Aug 2015 12:46 AM |
okay we wont read blobs k thx bai
wiki.roblox.com |
|
|
| Report Abuse |
|
|