Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script by AliefAthallah --
- local click = script.Parent:WaitForChild("ClickDetector")
- local pantsID = script.Parent.Parent.OutfitGiver.Pants.PantsTemplate -- Pants Template ID (Visit Category Group for some cool clothing) --
- local brick = script.Parent
- click.MouseClick:Connect(function(player)
- local pants = player.Character:FindFirstChild("Pants") -- Finding player Pants --
- if not pants then
- print("Pants was not found") -- Pants not found in player --
- local pants2 = Instance.new("Pants", player.Character) --- Creating new Pants in player --
- pants2.Name = "Pants"
- pants2.PantsTemplate = pantsID
- else if pants then
- print("pants was found") -- Pants found in player --
- pants.PantsTemplate = pantsID
- end
- end
- end)
- function OnEnter()
- brick.BrickColor = BrickColor.new("Lime green") -- Mouse Enter changing the brick color --
- end
- function OnLeave()
- brick.BrickColor = BrickColor.new("Medium stone grey") -- Mouse Leave changing the brick color --
- end
- click.MouseHoverEnter:Connect(OnEnter)
- click.MouseHoverLeave:Connect(OnLeave)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement