function GetValue()
local a=channel.GetChild(0):GetValue()
local b=channel.GetChild(1):GetValue()
local c=channel.GetChild(2):GetValue()
local d=channel.GetChild(3):GetValue()
local val=0
if c<1 and a<b then
val=0
elseif c>=d and a>b then
val=0
else
val=a-b
end
return val
end