Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Part = Instance.new("Part", workspace)
- Part.Size = Vector3.new(5, 0.5, 5)
- Part.Locked = true
- Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(Vector3.new(0, -2.5, 10))
- local Mesh = Instance.new("CylinderMesh", Part)
- local Gui = Instance.new("BillboardGui", Part)
- Gui.Size = UDim2.new(0, 800, 0, 400)
- local Text = Instance.new("TextLabel", Gui)
- Text.Size = UDim2.new(0, 300, 0, 100)
- Text.Position = UDim2.new(0.3, 0, 0, 0)
- Text.Text = "Touch for Admin"
- Text.TextScaled = true
- Text.BackgroundTransparency = 1
- Text.BorderSizePixel = 0
- Text.TextColor3 = Color3.new(255, 255, 255)
- Text.TextStrokeTransparency = 0
- -----------------------------------------------------------------------------------------------ItemID = 859277646 -- The ID of the Gamepass/T-Shirt.OpenTime = 1 -- The time the door is open for.OpenTrans = 0.5 -- The transparency of the door when it is open.CloseTrans = 0 -- The transparency of the door when it is closed.BuyGUI = true -- Set to false to stop the BuyGUI appearing.KillOnTouch = true -- Set to false to stop players being killed when they touch it.-----------------------------------------------------------------------------------------------Door = script.ParentServ = game:GetService("BadgeService")MServ = game:GetService("MarketplaceService")if not _G.Players then_G.Players = {[ItemID] = {}}elseif not _G.Players[ItemID] then_G.Players[ItemID] = {}endTable = _G.Players[ItemID]function CheckPlayer(player2)for i = 1,#Table doif Table[i] == player2 thenreturn trueendendreturn falseendDoor.Touched:connect(function(hit)if game.Players:GetPlayerFromCharacter(hit.Parent) thenplayer = game.Players:GetPlayerFromCharacter(hit.Parent)if Serv:UserHasBadge(player.userId,ItemID) or CheckPlayer(player) thenDoor.CanCollide = false Door.Transparency = OpenTranswait(OpenTime)Door.CanCollide = true Door.Transparency = CloseTranselseDoor.CanCollide = true Door.Transparency = CloseTransif BuyGUI == true thenMServ:PromptPurchase(player,ItemID)h = player.Character:FindFirstChild("Humanoid")if h thenh.WalkSpeed = 0 endlocal concon = MServ.PromptPurchaseFinished:connect(function(ply,asset,purch)if ply == player and asset == ItemID thencon:disconnect()if purch thenif h thenh.WalkSpeed = 16 endtable.insert(Table,player)elseif KillOnTouch == true thenDoor.CanCollide = true Door.Transparency = CloseTransplayer.Character:BreakJoints()endendend)elseif KillOnTouch == true thenDoor.CanCollide = true Door.Transparency = CloseTransplayer.Character:BreakJoints()endendendend)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement