-- Variables
local Open = false local Frame = script.Parent.Parent.ClickMoneyFrame local Tablet = false
-- Code
if game:GetService('UserInputService').TouchEnabled == true then Tablet = true script.Parent.MouseButton1Click:connect(function() Frame:TweenSize(UDim2.new(0, 300,0, 150), 'Out', 'Quad', 0) if Open ~= false then Open = true Frame.Visible = true Frame:TweenPosition(UDim2.new(0.5, -80, 0.5, -75), 'Out', 'Quad', 1) elseif Open ~= true then Open = false Frame:TweenPosition(UDim2.new(1, 0, 0.5, -75), 'Out', 'Quad', 1) end end)
else
if Tablet ~= false then function Open() if Open ~= false then Frame.Visible = true Open = true Frame:TweenPosition(UDim2.new(0.5, -250,0.5, -100), 'Out', 'Quad', 1) end end
script.Parent.MouseButton1Click:connect(Open()) end end>
It won't open the GUI, please give me a fixed version of the script, thanks c: