Advertisement
Sungmingamerpro13

GiveTool + TeleportData

Jan 29th, 2023
1,471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.65 KB | None | 0 0
  1. local TeleportService = game:GetService("TeleportService")
  2. local Players = game:GetService("Players")
  3. local MarketPlaceService = game:GetService("MarketplaceService")
  4. local GamepassTools = game.ReplicatedStorage:FindFirstChild("GamepassTools")
  5.  
  6. function GiveTool(player, Id, Tool)
  7.     if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, Id) then
  8.         Tool:Clone().Parent = player.Backpack
  9.         Tool:Clone().Parent = player.StarterGear
  10.     end
  11. end
  12.  
  13. Players.PlayerAdded:Connect(function(player)
  14.     GiveTool(player, (0), GamepassTools:FindFirstChild("Medkit"))
  15.     GiveTool(player, (0), GamepassTools:FindFirstChild("Flashlight"))
  16. end)
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement