Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ServerStorage = game.ServerStorage.RainbowTrail:Clone()
- local gamepassid = 10498381
- local function hasGP(pid, gpid)
- return game:GetService("MarketplaceService"):UserOwnsGamePassAsync(pid, gpid)
- end
- local function attach(child, attachments)
- for i = 1,#attachments do
- local offset = tostring(i -1)
- local attachment = Instance.new("Attachment")
- attachment.Parent = attachments[i]
- attachment.Name = "TrailAttachment"..offset
- child["Attachment"..offset] = attachment
- end
- child.Parent = attachments[1]
- end
- game.Players.PlayerAdded:Connect(function(plr)
- plr.CharacterAdded:Connect(function(chr)
- if hasGP(plr.UserId, gamepassid) then
- attach(ServerStorage, {chr.Head, chr.HumanoidRootPart})
- end
- end)
- end)
Add Comment
Please, Sign In to add comment