Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Uniform Giver
- -- Gullet
- -- 2015/02/01
- -- Tags --
- local pantsId = script.Parent.Parent.Pants.Pants.PantsTemplate
- local cPart = script.Parent
- local cDetector = script.Parent.ClickDetector
- local left = script.Parent.Parent.Pants["Left Leg"]
- local right = script.Parent.Parent.Pants["Right Leg"]
- amnt = 5
- -- Functions --
- local function onClicked(player)
- print(player.Name.." clicked on Uniform Giver")
- local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
- if not foundPants then -- if there are no pants
- print("No pants found, creating for "..player.Name)
- local newPants = Instance.new("Pants",player.Character)
- newPants.Name = "Pants"
- else if foundPants then -- if there are pants
- print("Pants found, reconstructing for "..player.Name)
- player.Character.Pants:remove()
- local newPants = Instance.new("Pants",player.Character)
- newPants.Name = "Pants"
- wait(1)
- script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,-50,0)
- left.Transparency = 1
- right.Transparency = 1
- wait(amnt)
- script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,50,0)
- left.Transparency = 0
- right.Transparency = 0
- end
- end
- player.Character.Pants.PantsTemplate = pantsId
- end
- --local function onHoverEnter(player)
- --cPart.SurfaceGui.Frame.ImageLabel.Visible = true
- --end
- --local function onHoverLeave(player)
- --cPart.SurfaceGui.Frame.ImageLabel.Visible = false
- --end
- -- Binds --
- --cDetector.MouseHoverEnter:connect(onHoverEnter)
- --cDetector.MouseHoverLeave:connect(onHoverLeave)
- cDetector.MouseClick:connect(onClicked)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement