Universal Script 📌
30.7k Views
100 Executions

Calculator script

Universal Script 📌
Fanumtax7979
Fanumtax7979Published 5
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

A calculator has a show button and hide button and is moveable

Updates

  1. Script edited: Create script

View Raw
-- GUI Layout
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 250)
frame.Position = UDim2.new(0.5, -100, 0.5, -125)
frame.BackgroundColor3 = Color3.new(1, 1, 1)
frame.Parent = screenGui

local textBox = Instance.new("TextBox")
textBox.Size = UDim2.new(0, 180, 0, 40)
textBox.Position = UDim2.new(0, 10, 0, 10)
textBox.Text = ""
textBox.Parent = frame

local buttonNames = {"7", "8", "9", "+", "4", "5", "6", "-", "1", "2", "3", "*", "0", "C", "=", "/"}

for i, name in ipairs(buttonNames) do
    local button = Instance.new("TextButton")
    button.Size = UDim2.new(0, 40, 0, 40)
    button.Text = name
    button.Parent = frame
    
    local x = ((i - 1) % 4) * 45 + 10
    local y = math.floor((i - 1) / 4) * 50 + 60
    button.Position = UDim2.new(0, x, 0, y)
end

local hideButton = Instance.new("TextButton")
hideButton.Size = UDim2.new(0, 80, 0, 30)
hideButton.Position = UDim2.new(0, 10, 0, 260)
hideButton.Text = "Hide"
hideButton.Parent = screenGui

local showButton = Instance.new("TextButton")
showButton.Size = UDim2.new(0, 80, 0, 30)
showButton.Position = UDim2.new(0, 100, 0, 260)
showButton.Text = "Show"
showButton.Visible = false


Comments

3
Log in to join the conversation. Login
oogwaym52's profile picture
oogwaym522 years ago(edited)

why the hell do i need this

2
NamelessGod's profile picture
NamelessGod2 years ago(edited)

great, i like it

1
lucaslsarba's profile picture
lucaslsarba2 years ago(edited)

Most useful script ever

1

More universal scripts

See all
Universal Script 📌
9
0
Approved 4 minutes ago
Key System
Universal Script 📌
11
2
Approved 11 minutes ago
Universal Script 📌
23
1
Approved 29 minutes ago
Universal Script 📌
29
2
Approved 58 minutes ago
Script hub
43
1
Approved 1 hour ago

Script hub

konata.fun