repeat(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Stepped:Wait()until game.Players.LocalPlayer local t=script.Parent.Parent local N=t:GetMouse()local M=false local p local L=false N.Button1Up:Connect(function()if M==true then p=N.Target if p.Name=="\112\097\112\101\114"then if L==false then script.Parent.Image.image.ImageLabel.Image=p.Decal.Texture L=true elseif L==true then L=false end script.Parent.Image.Enabled=L end end end)N.Button1Up:Connect(function()if L==true then L=false script.Parent.Image.Enabled=L end end)while wait()do if N.Target then if N.Target.Name=="\112\097\112\101\114"then if not N.Target:FindFirstChild("\115\101\108\101\099\116\105\111\110")and script.Parent.IsUsingValve.Value==false then box=script.Parent.ValveUI.selection:clone()box.Parent=N.Target M=true box.Adornee=N.Target end else M=false if box then box:Destroy()end end end end
-- R6 only!

repeat
	game:GetService("RunService").Stepped:Wait()
until game.Players.LocalPlayer
local player = script.Parent.Parent
local mouse = player:GetMouse()
local selecting = false
local valve

local enabled = false
mouse.Button1Up:Connect(function()
	if selecting == true then
		valve = mouse.Target
		if valve.Name == "paper" then
			if enabled == false then
				script.Parent.Image.image.ImageLabel.Image = valve.Decal.Texture
				enabled = true
			elseif enabled == true then
				enabled = false
			end

			script.Parent.Image.Enabled = enabled
		end
	end
end)

mouse.Button1Up:Connect(function()
	if enabled == true then
		enabled = false
		script.Parent.Image.Enabled = enabled
	end
end)

while wait() do
	if mouse.Target then
		if mouse.Target.Name == "paper" then
			if not mouse.Target:FindFirstChild("selection") and script.Parent.IsUsingValve.Value == false then
				box = script.Parent.ValveUI.selection:clone()
				box.Parent = mouse.Target

				selecting = true
				box.Adornee = mouse.Target
			end
		else
			selecting = false
			if box then
				box:Destroy()
			end
		end
	end
end
