Advertisement
Mitko1223tm

test test

Oct 29th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. local Part = Instance.new("Part", workspace)
  2. Part.Size = Vector3.new(5, 0.5, 5)
  3. Part.Locked = true
  4. Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(Vector3.new(0, -2.5, 10))
  5. local Mesh = Instance.new("CylinderMesh", Part)
  6. local Gui = Instance.new("BillboardGui", Part)
  7. Gui.Size = UDim2.new(0, 800, 0, 400)
  8. local Text = Instance.new("TextLabel", Gui)
  9. Text.Size = UDim2.new(0, 300, 0, 100)
  10. Text.Position = UDim2.new(0.3, 0, 0, 0)
  11. Text.Text = "Touch for Admin"
  12. Text.TextScaled = true
  13. Text.BackgroundTransparency = 1
  14. Text.BorderSizePixel = 0
  15. Text.TextColor3 = Color3.new(255, 255, 255)
  16. Text.TextStrokeTransparency = 0
  17.  
  18. -----------------------------------------------------------------------------------------------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