Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.52 KB | None | 0 0
  1. local MPS = game:GetService("MarketplaceService")
  2. local ID = 4828207
  3.  
  4. MPS.PromptGamePassPurchaseFinished:Connect(function(Player, GPID, Purchased)
  5.     if GPID == ID and Purchased == true then
  6.         local Char = Player.Character or Player.CharacterAdded:Wait()
  7.         local ChosenTrail = game.ReplicatedStorage:WaitForChild(Player.Name):WaitForChild("ChosenTrail")
  8.         ChosenTrail.Value = "GoldTrail"
  9.         spawn(function()
  10.             for _,v in pairs(Char:WaitForChild("Head"):GetChildren()) do
  11.                 if v:IsA("Trail") and v.Name ~= "GoldTrail" then
  12.                     v:Destroy()
  13.                 end
  14.             end
  15.         end)
  16.         local Trail = game.ReplicatedStorage:WaitForChild("GoldTrail"):Clone()
  17.         Trail.Parent = Char.Head
  18.         local Attachment0 = Instance.new("Attachment")
  19.         Attachment0.Parent = Char.Head
  20.         Attachment0.Name = "TrailAttachment0"
  21.         local Attachment1 = Instance.new("Attachment")
  22.         Attachment1.Parent = Char.HumanoidRootPart
  23.         Attachment1.Name = "TrailAttachment1"
  24.         Trail.Attachment0 = Attachment0
  25.         Trail.Attachment1 = Attachment1
  26.         local Taco = game.ServerStorage.VIPTaco:Clone()
  27.         Taco.Parent = Player.Backpack
  28.         Player:WaitForChild("Tags"):WaitForChild(Player:GetRoleInGroup(4240806)).Name = "Ultra VIP"
  29.         Player:WaitForChild("Tags"):WaitForChild("Ultra VIP").ChatColor.Value = Color3.fromRGB(255, 255, 0)
  30.         Player:WaitForChild("Tags"):WaitForChild("Ultra VIP").TagColor.Value = Color3.fromRGB(255, 255, 0)
  31.     end
  32. end)
  33.  
  34. game.Players.PlayerAdded:Connect(function(Player)
  35.     Player.CharacterAdded:Connect(function(Char)
  36.         if MPS:UserOwnsGamePassAsync(Player.UserId, ID) then
  37.             local Taco = game.ServerStorage.VIPTaco:Clone()
  38.             Taco.Parent = Player.Backpack
  39.             Player:WaitForChild("Tags"):WaitForChild(Player:GetRoleInGroup(4240806)).Name = "Ultra VIP"
  40.             Player:WaitForChild("Tags"):WaitForChild("Ultra VIP").ChatColor.Value = Color3.fromRGB(255, 255, 0)
  41.             Player:WaitForChild("Tags"):WaitForChild("Ultra VIP").TagColor.Value = Color3.fromRGB(255, 255, 0)
  42.             local ChosenTrail = game.ReplicatedStorage:WaitForChild(Player.Name):WaitForChild("ChosenTrail")
  43.             if ChosenTrail.Value == "GoldTrail" then
  44.                 local Trail = game.ReplicatedStorage:WaitForChild("GoldTrail"):Clone()
  45.                 Trail.Parent = Char.Head
  46.                 local Attachment0 = Instance.new("Attachment")
  47.                 Attachment0.Parent = Char.Head
  48.                 Attachment0.Name = "TrailAttachment0"
  49.                 local Attachment1 = Instance.new("Attachment")
  50.                 Attachment1.Parent = Char.HumanoidRootPart
  51.                 Attachment1.Name = "TrailAttachment1"
  52.                 Trail.Attachment0 = Attachment0
  53.                 Trail.Attachment1 = Attachment1
  54.             end
  55.         end
  56.     end)   
  57. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement