Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local number2 = Instance.new("TextBox")
- local operation = Instance.new("TextBox")
- local number1 = Instance.new("TextBox")
- local calculate = Instance.new("TextButton")
- local openclose = Instance.new("TextButton")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.new(0.168627, 0.168627, 1)
- Frame.BackgroundTransparency = 0.69999998807907
- Frame.Position = UDim2.new(0.25, 0, 0.167512685, 0)
- Frame.Size = UDim2.new(0, 301, 0, 247)
- Frame.Active = true
- Frame.Draggable = true
- number2.Name = "number2"
- number2.Parent = Frame
- number2.BackgroundColor3 = Color3.new(1, 1, 1)
- number2.BackgroundTransparency = 0.64999997615814
- number2.Position = UDim2.new(0, 0, 0.178137645, 0)
- number2.Size = UDim2.new(0, 108, 0, 50)
- number2.Font = Enum.Font.SourceSans
- number2.Text = ""
- number2.TextColor3 = Color3.new(0, 0, 0)
- number2.TextSize = 14
- operation.Name = "operation"
- operation.Parent = Frame
- operation.BackgroundColor3 = Color3.new(1, 1, 1)
- operation.BackgroundTransparency = 0.75
- operation.Position = UDim2.new(0.425249189, 0, 0.178137645, 0)
- operation.Size = UDim2.new(0, 67, 0, 50)
- operation.Font = Enum.Font.SourceSans
- operation.Text = ""
- operation.TextColor3 = Color3.new(0, 0, 0)
- operation.TextSize = 30
- number1.Name = "number1"
- number1.Parent = Frame
- number1.BackgroundColor3 = Color3.new(1, 1, 1)
- number1.BackgroundTransparency = 0.80000001192093
- number1.Position = UDim2.new(0.681063116, 0, 0.178137645, 0)
- number1.Size = UDim2.new(0, 96, 0, 50)
- number1.Font = Enum.Font.SourceSans
- number1.Text = ""
- number1.TextColor3 = Color3.new(0, 0, 0)
- number1.TextSize = 14
- calculate.Name = "calculate"
- calculate.Parent = Frame
- calculate.BackgroundColor3 = Color3.new(0.8, 0.396078, 1)
- calculate.BackgroundTransparency = 0.89999997615814
- calculate.Position = UDim2.new(0.164470434, 0, 0.460839719, 0)
- calculate.Size = UDim2.new(0, 200, 0, 50)
- calculate.Font = Enum.Font.SourceSans
- calculate.Text = "Calculate"
- calculate.TextColor3 = Color3.new(0, 0, 0)
- calculate.TextSize = 14
- calculate.MouseButton1Click:connect(function()
- if operation.Text == "+" then
- local answer = number2.Text + number1.Text
- print(answer)
- local A_1 = "" ..answer
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- end
- if operation.Text == "-" then
- local answer = number2.Text - number1.Text
- print(answer)
- local A_1 = "" ..answer
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- end
- if operation.Text == "/" then
- local answer = number2.Text / number1.Text
- print(answer)
- local A_1 = "" ..answer
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- end
- if operation.Text == "x" or operation.Text == "X" or operation.Text == "*" then
- local answer = number2.Text * number1.Text
- print(answer)
- local A_1 = "" ..answer
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- end
- end)
- openclose.Name = "open/close"
- openclose.Parent = ScreenGui
- openclose.BackgroundColor3 = Color3.new(0.227451, 0.796079, 1)
- openclose.BackgroundTransparency = 0.55000001192093
- openclose.Position = UDim2.new(0, 0, 0.873096466, 0)
- openclose.Size = UDim2.new(0, 200, 0, 50)
- openclose.Font = Enum.Font.SourceSans
- openclose.Text = "Open/Close"
- openclose.TextColor3 = Color3.new(0, 0, 0)
- openclose.TextSize = 14
- openclose.MouseButton1Click:connect(function()
- if Frame.Visible == true then
- Frame.Visible = false
- else
- Frame.Visible = true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement