wait()

repeat wait() until game.Players.LocalPlayer.Character ~= nil
local ContentProvider = Game:GetService("ContentProvider")
 
local function WaitForAssetsToLoad()
	while (ContentProvider.RequestQueueSize > 0) do
		wait()
	end
end
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
wait(2)
if not plr.Character:findFirstChild("Shirt") then
	local newshirt = Instance.new("Shirt")
	newshirt.Parent = plr.Character
	newshirt.Name = "Shirt"
end
wait(2)
if not plr.Character:findFirstChild("Pants") then
	local newshirt = Instance.new("Pants")
	newshirt.Parent = plr.Character
	newshirt.Name = "Pants"
end
local ownersshirt = plr.Character:findFirstChild("Shirt").ShirtTemplate
local ownerspants = plr.Character:findFirstChild("Pants").PantsTemplate
local shirt = plr.Character:WaitForChild("Shirt")
local pants = plr.Character:WaitForChild("Pants")
wait()
mouse.Button1Down:connect(function()
	if mouse.Target == nil then
	return end
	if mouse.Target.Name == "Coconut" then
			wait()
			mouse.Target.Anchored=false
	end
	if mouse.Target.Name == "Buy" then
		mouse.Target:findFirstChild("ID")
		game:GetService("MarketplaceService"):PromptPurchase(plr, mouse.Target:findFirstChild("ID").Value)
	end
end)
mouse.Move:connect(function()
	if mouse.Target == nil then
	return end
	if mouse.Target ~= nil then
	if mouse.Target.Name == "Buy" then
		mouse.Icon = 'http://www.roblox.com/asset/?id=181637101'
		end
		if mouse.Target.Name == "Buy" then
			if mouse.Target:findFirstChild("IsA").Value == "Shirt" then
			shirt.ShirtTemplate = (mouse.Target.Parent:findFirstChild("Shirt").ShirtTemplate)
			end
			if mouse.Target:findFirstChild("IsA").Value == "Pants" then
				pants.PantsTemplate = (mouse.Target.Parent:findFirstChild("Pants").PantsTemplate)
			end
		end
		if mouse.Target.Name ~= "Buy" then
			mouse.Icon = ''
			pants.PantsTemplate = ownerspants
			shirt.ShirtTemplate = ownersshirt
		end
	end
end)

1 comment

0

What are you asking us to do?