repeat(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Stepped:Wait()until game.Players.LocalPlayer local k=script.Parent.Parent local A=k:GetMouse()local S=false local X local c=false A.Button1Up:Connect(function()if S==true then X=A.Target if X.Name=="\112\097\112\101\114"then if c==false then script.Parent.Image.image.ImageLabel.Image=X.Decal.Texture c=true elseif c==true then c=false end script.Parent.Image.Enabled=c end end end)A.Button1Up:Connect(function()if c==true then c=false script.Parent.Image.Enabled=c end end)while wait()do if A.Target then if A.Target.Name=="\112\097\112\101\114"then if not A.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=A.Target S=true box.Adornee=A.Target end else S=false if box then box:Destroy()end end end end


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

