Advertisement
4zx16

Headless Command (Gamepass)

Jan 2nd, 2022 (edited)
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | Source Code | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || HEADLESS COMMAND (Gamepass)
  3. ]]
  4. game.Players.PlayerAdded:Connect(function(player)
  5.     player.Chatted:Connect(function(msg)
  6.  
  7.         local Headless = {"@headless", "/headless", ":headless"}
  8.         local Unheadless = {"@unheadless", "/unheadless", ":unheadless"}
  9.         local MPS = game:GetService("MarketplaceService")
  10.         local id = 0
  11.  
  12.         for i, HeadlessCommand in pairs(Headless) do
  13.             if msg:sub(1, HeadlessCommand:len()):lower() == HeadlessCommand:lower() then
  14.                 if MPS:UserOwnsGamePassAsync(player.UserId, id) then
  15.                     player.Character.Head.Transparency = 1
  16.                     player.Character.Head.face.Transparency = 1
  17.                 else
  18.                     wait(0.9)
  19.                     MPS:PromptGamePassPurchase(player, id)
  20.                 end
  21.             else
  22.                 if player.Character.Head.Transparency == 1 then
  23.                     for i, UnheadlessCommand in pairs(Unheadless) do
  24.                         if msg:sub(1, UnheadlessCommand:len()):lower() == UnheadlessCommand:lower() then
  25.                             if MPS:UserOwnsGamePassAsync(player.UserId, id) then
  26.                                 player.Character.Head.Transparency = 0
  27.                                 player.Character.Head.face.Transparency = 0
  28.                             else
  29.                                 wait(0.9)
  30.                                 MPS:PromptGamePassPurchase(player, id)
  31.                             end
  32.                         end
  33.                     end
  34.                 end
  35.             end
  36.         end
  37.     end)
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement