Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function stud_convert(n, Mode)
- local left = n
- local TH2,TH,H,T
- if Mode == 1 then
- TH2 = (left-(left%10000)) or 0
- left = left-TH2
- TH = (left-(left%1000)) or 0
- left = left-TH
- H = (left-(left%100)) or 0
- left = left-H
- T = (left-(left%10)) or 0
- left = left-T
- elseif Mode == 2 then
- TH2 = (left-(left%10000))/10000 or 0
- left = left-TH2*10000
- TH = (left-(left%1000))/1000 or 0
- left = left-TH*1000
- H = (left-(left%100))/100 or 0
- left = left-H*100
- T = (left-(left%10))/10 or 0
- left = left-T*10
- end
- return TH2, TH, H, T
- end
- function create_stud(color,p,Name)
- local part = Instance.new("Part")
- part.Name = Name
- part.Color = color
- part.Size = Vector3.new(1, 1, 1)
- part.Locked = true
- part.BackSurface = Enum.SurfaceType.Studs
- part.BottomSurface = Enum.SurfaceType.Studs
- part.FrontSurface = Enum.SurfaceType.Studs
- part.LeftSurface = Enum.SurfaceType.Studs
- part.RightSurface = Enum.SurfaceType.Studs
- part.Parent = p
- --game:GetService("Debris"):AddItem(part,30)
- return part
- end
- function stud_drop(Torso, Amount, Mode, Purple, Blue, Gold, Silver)
- if Mode == 2 then
- local P = create_stud(Color3.fromRGB(255, 255, 255), script,'Big Pip')
- P.Size = Vector3.new(4,4,4)
- P.Reflectance = 1
- P.CFrame = Torso.CFrame*CFrame.Angles(0,0,0)*CFrame.new(0,7,-6)
- --[[
- local billboard = Instance.new("BillboardGui")
- local giveamount = Instance.new("TextBox")
- billboard.Parent = P
- billboard.Size = UDim2.new(10, 10, 0.5, 1)
- billboard.Active = true
- billboard.StudsOffset = Vector3.new(0, 1.5, 0)
- giveamount.Name = "Text"
- giveamount.Parent = billboard
- giveamount.Size = UDim2.new(1, 1, 1, 1)
- giveamount.BackgroundColor = BrickColor.new("Really black")
- giveamount.BackgroundColor3 = Color3.new(0, 0, 0)
- giveamount.BackgroundTransparency = 1
- giveamount.BorderColor = BrickColor.new("Really black")
- giveamount.BorderColor3 = Color3.new(0, 0, 0)
- giveamount.Font = Enum.Font.Code
- giveamount.FontSize = Enum.FontSize.Size14
- giveamount.Text = "1000"
- giveamount.TextColor = BrickColor.new("Institutional white")
- giveamount.TextColor3 = Color3.new(1, 1, 1)
- giveamount.TextScaled = true
- giveamount.TextSize = 14
- giveamount.TextStrokeTransparency = 0
- giveamount.TextWrap = true
- giveamount.TextWrapped = true
- giveamount.TextYAlignment = Enum.TextYAlignment.Top
- giveamount.ClearTextOnFocus = false
- giveamount.MultiLine = true
- ]]
- local touched = false
- P.Touched:Connect(function(obj)
- if touched then return end
- local char,hum,studs,antistuds
- pcall(function()
- char = obj.Parent
- end)
- pcall(function()
- hum = char:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- studs = hum:FindFirstChild("Studs Balance")
- end)
- pcall(function()
- antistuds = hum:FindFirstChild("S.B.A.C")
- end)
- if char and hum and hum.Health > 0 and studs and antistuds then
- antistuds.Value = true
- touched = true
- studs.Value = studs.Value + Amount
- P:Destroy()
- wait()
- antistuds.Value = false
- end
- end)
- end
- if Mode == 1 then else return end
- for i = 1,Purple do
- local P = create_stud(Color3.fromRGB(61, 21, 133), script,'Purple Pip')
- P.CFrame = Torso.CFrame*CFrame.Angles(0,0,0)*CFrame.new(0,3,-6)
- --[[
- local billboard = Instance.new("BillboardGui")
- local giveamount = Instance.new("TextBox")
- billboard.Parent = P
- billboard.Size = UDim2.new(10, 10, 0.5, 1)
- billboard.Active = true
- billboard.StudsOffset = Vector3.new(0, 1, 0)
- giveamount.Name = "Text"
- giveamount.Parent = billboard
- giveamount.Size = UDim2.new(1, 1, 1, 1)
- giveamount.BackgroundColor = BrickColor.new("Really black")
- giveamount.BackgroundColor3 = Color3.new(0, 0, 0)
- giveamount.BackgroundTransparency = 1
- giveamount.BorderColor = BrickColor.new("Really black")
- giveamount.BorderColor3 = Color3.new(0, 0, 0)
- giveamount.Font = Enum.Font.Code
- giveamount.FontSize = Enum.FontSize.Size14
- giveamount.Text = tostring(Amount)
- giveamount.TextColor = BrickColor.new("Institutional white")
- giveamount.TextColor3 = Color3.new(1, 1, 1)
- giveamount.TextScaled = true
- giveamount.TextSize = 14
- giveamount.TextStrokeTransparency = 0
- giveamount.TextWrap = true
- giveamount.TextWrapped = true
- giveamount.TextYAlignment = Enum.TextYAlignment.Top
- giveamount.ClearTextOnFocus = false
- giveamount.MultiLine = true
- ]]
- local touched = false
- P.Touched:Connect(function(obj)
- if touched then return end
- local char,hum,studs,antistuds
- pcall(function()
- char = obj.Parent
- end)
- pcall(function()
- hum = char:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- studs = hum:FindFirstChild("Studs Balance")
- end)
- pcall(function()
- antistuds = hum:FindFirstChild("S.B.A.C")
- end)
- if char and hum and hum.Health > 0 and studs and antistuds then
- antistuds.Value = true
- touched = true
- studs.Value = studs.Value + 10000
- P:Destroy()
- wait()
- antistuds.Value = false
- end
- end)
- end
- for i = 1,Blue do
- local B = create_stud(Color3.fromRGB(9, 137, 207), script,'Blue Pip')
- B.CFrame = Torso.CFrame*CFrame.Angles(0,0,0)*CFrame.new(0,3,-6)
- --[[
- local billboard = Instance.new("BillboardGui")
- local giveamount = Instance.new("TextBox")
- billboard.Parent = B
- billboard.Size = UDim2.new(10, 10, 0.5, 1)
- billboard.Active = true
- billboard.StudsOffset = Vector3.new(0, 1, 0)
- giveamount.Name = "Text"
- giveamount.Parent = billboard
- giveamount.Size = UDim2.new(1, 1, 1, 1)
- giveamount.BackgroundColor = BrickColor.new("Really black")
- giveamount.BackgroundColor3 = Color3.new(0, 0, 0)
- giveamount.BackgroundTransparency = 1
- giveamount.BorderColor = BrickColor.new("Really black")
- giveamount.BorderColor3 = Color3.new(0, 0, 0)
- giveamount.Font = Enum.Font.Code
- giveamount.FontSize = Enum.FontSize.Size14
- giveamount.Text = "1000"
- giveamount.TextColor = BrickColor.new("Institutional white")
- giveamount.TextColor3 = Color3.new(1, 1, 1)
- giveamount.TextScaled = true
- giveamount.TextSize = 14
- giveamount.TextStrokeTransparency = 0
- giveamount.TextWrap = true
- giveamount.TextWrapped = true
- giveamount.TextYAlignment = Enum.TextYAlignment.Top
- giveamount.ClearTextOnFocus = false
- giveamount.MultiLine = true
- ]]
- local touched = false
- B.Touched:Connect(function(obj)
- if touched then return end
- local char,hum,studs,antistuds
- pcall(function()
- char = obj.Parent
- end)
- pcall(function()
- hum = char:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- studs = hum:FindFirstChild("Studs Balance")
- end)
- pcall(function()
- antistuds = hum:FindFirstChild("S.B.A.C")
- end)
- if char and hum and hum.Health > 0 and studs and antistuds then
- antistuds.Value = true
- touched = true
- studs.Value = studs.Value + 1000
- B:Destroy()
- wait()
- antistuds.Value = false
- end
- end)
- end
- for i = 1,Gold do
- local G = create_stud(Color3.fromRGB(239, 184, 56), script,'Gold Pip')
- G.CFrame = Torso.CFrame*CFrame.Angles(0,0,0)*CFrame.new(0,3,-6)
- --[[
- local billboard = Instance.new("BillboardGui")
- local giveamount = Instance.new("TextBox")
- billboard.Parent = G
- billboard.Size = UDim2.new(10, 10, 0.5, 1)
- billboard.Active = true
- billboard.StudsOffset = Vector3.new(0, 1, 0)
- giveamount.Name = "Text"
- giveamount.Parent = billboard
- giveamount.Size = UDim2.new(1, 1, 1, 1)
- giveamount.BackgroundColor = BrickColor.new("Really black")
- giveamount.BackgroundColor3 = Color3.new(0, 0, 0)
- giveamount.BackgroundTransparency = 1
- giveamount.BorderColor = BrickColor.new("Really black")
- giveamount.BorderColor3 = Color3.new(0, 0, 0)
- giveamount.Font = Enum.Font.Code
- giveamount.FontSize = Enum.FontSize.Size14
- giveamount.Text = "100"
- giveamount.TextColor = BrickColor.new("Institutional white")
- giveamount.TextColor3 = Color3.new(1, 1, 1)
- giveamount.TextScaled = true
- giveamount.TextSize = 14
- giveamount.TextStrokeTransparency = 0
- giveamount.TextWrap = true
- giveamount.TextWrapped = true
- giveamount.TextYAlignment = Enum.TextYAlignment.Top
- giveamount.ClearTextOnFocus = false
- giveamount.MultiLine = true
- ]]
- local touched = false
- G.Touched:Connect(function(obj)
- if touched then return end
- local char,hum,studs,antistuds
- pcall(function()
- char = obj.Parent
- end)
- pcall(function()
- hum = char:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- studs = hum:FindFirstChild("Studs Balance")
- end)
- pcall(function()
- antistuds = hum:FindFirstChild("S.B.A.C")
- end)
- if char and hum and hum.Health > 0 and studs and antistuds then
- antistuds.Value = true
- touched = true
- studs.Value = studs.Value + 100
- G:Destroy()
- wait()
- antistuds.Value = false
- end
- end)
- end
- for i = 1,Silver do
- local S = create_stud(Color3.fromRGB(255, 255, 255), script,'Silver Pip')
- S.Reflectance = 0.6
- S.CFrame = Torso.CFrame*CFrame.Angles(0,0,0)*CFrame.new(0,3,-6)
- --[[
- local billboard = Instance.new("BillboardGui")
- local giveamount = Instance.new("TextBox")
- billboard.Parent = S
- billboard.Size = UDim2.new(10, 10, 0.5, 1)
- billboard.Active = true
- billboard.StudsOffset = Vector3.new(0, 1, 0)
- giveamount.Name = "Text"
- giveamount.Parent = billboard
- giveamount.Size = UDim2.new(1, 1, 1, 1)
- giveamount.BackgroundColor = BrickColor.new("Really black")
- giveamount.BackgroundColor3 = Color3.new(0, 0, 0)
- giveamount.BackgroundTransparency = 1
- giveamount.BorderColor = BrickColor.new("Really black")
- giveamount.BorderColor3 = Color3.new(0, 0, 0)
- giveamount.Font = Enum.Font.Code
- giveamount.FontSize = Enum.FontSize.Size14
- giveamount.Text = "10"
- giveamount.TextColor = BrickColor.new("Institutional white")
- giveamount.TextColor3 = Color3.new(1, 1, 1)
- giveamount.TextScaled = true
- giveamount.TextSize = 14
- giveamount.TextStrokeTransparency = 0
- giveamount.TextWrap = true
- giveamount.TextWrapped = true
- giveamount.TextYAlignment = Enum.TextYAlignment.Top
- giveamount.ClearTextOnFocus = false
- giveamount.MultiLine = true
- ]]
- local touched = false
- S.Touched:Connect(function(obj)
- if touched then return end
- local char,hum,studs,antistuds
- pcall(function()
- char = obj.Parent
- end)
- pcall(function()
- hum = char:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- studs = hum:FindFirstChild("Studs Balance")
- end)
- pcall(function()
- antistuds = hum:FindFirstChild("S.B.A.C")
- end)
- if char and hum and hum.Health > 0 and studs and antistuds then
- antistuds.Value = true
- touched = true
- studs.Value = studs.Value + 10
- S:Destroy()
- wait()
- antistuds.Value = false
- end
- end)
- end
- --warn("finished stud_drop")
- end
- function drop(hum,amount)
- local char,torso,studs,antistuds
- pcall(function()
- char = hum.Parent
- end)
- pcall(function()
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- studs = hum:FindFirstChild("Studs Balance")
- end)
- pcall(function()
- antistuds = hum:FindFirstChild("S.B.A.C")
- end)
- if char and torso and hum and studs and antistuds then
- antistuds.Value = true
- studs.Value = studs.Value - amount
- --print(amount)
- if amount > 100000 then
- stud_drop(torso, amount, 2, stud_convert(amount,2))
- else
- stud_drop(torso, amount, 1, stud_convert(amount,2))
- end
- wait()
- antistuds.Value = false
- end
- --warn("finished drop")
- end
- function char_setup(plr,char,hum)
- local torso,studs,antistuds
- pcall(function()
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- end)
- if char and torso and hum then
- studs = Instance.new("IntValue")
- if plr.UserId == 279462171 then
- studs.Value = 99999999999
- else
- studs.Value = 10
- end
- studs.Name = "Studs Balance"
- studs.Parent = hum
- antistuds = Instance.new("BoolValue")
- antistuds.Value = false
- antistuds.Name = "S.B.A.C"
- antistuds.Parent = hum
- end
- return studs,antistuds
- --warn("loaded char_setup")
- end
- function gui_setup(plr)
- local screen = Instance.new("ScreenGui")
- local frame = Instance.new("Frame")
- local balance = Instance.new("TextBox")
- local title = Instance.new("TextLabel")
- local frame1 = Instance.new("Frame")
- local silver = Instance.new("TextButton")
- local gold = Instance.new("TextButton")
- local blue = Instance.new("TextButton")
- local purple = Instance.new("TextButton")
- local toggle = Instance.new("TextButton")
- local shop_toggle = Instance.new("TextButton")
- screen.Name = "KrY's lego currency gui"
- screen.Parent = plr['PlayerGui']
- screen.ZIndexBehavior = Enum.ZIndexBehavior.Global
- frame.Parent = screen
- frame.Position = UDim2.new(2.3865141e-09, 0, 0.460342169, 0)
- frame.Size = UDim2.new(0.113795288, 0, 0.0793157071, 0)
- frame.BackgroundColor = BrickColor.new("Institutional white")
- frame.BackgroundColor3 = Color3.new(1, 1, 1)
- frame.BackgroundTransparency = 1
- balance.Name = "balance"
- balance.Parent = frame
- balance.Position = UDim2.new(0.52513957, 0, 0.40745154, 0)
- balance.Size = UDim2.new(0.642458081, 0, 0.631764114, 0)
- balance.BackgroundColor = BrickColor.new("Alder")
- balance.BackgroundColor3 = Color3.new(0.784314, 0.384314, 1)
- balance.BorderColor = BrickColor.new("Really black")
- balance.BorderColor3 = Color3.new(0, 0, 0)
- balance.Selectable = false
- balance.Font = Enum.Font.SourceSans
- balance.FontSize = Enum.FontSize.Size14
- balance.Text = "0"
- balance.TextColor = BrickColor.new("Really black")
- balance.TextColor3 = Color3.new(0, 0, 0)
- balance.TextScaled = true
- balance.TextSize = 14
- balance.TextWrap = true
- balance.TextWrapped = true
- title.Parent = screen
- title.Position = UDim2.new(0.00572153181, 0, 0.49265942, 0)
- title.Size = UDim2.new(0.0476795919, 0, 0.0501088612, 0)
- title.BackgroundColor = BrickColor.new("Alder")
- title.BackgroundColor3 = Color3.new(0.694118, 0.384314, 1)
- title.Font = Enum.Font.SourceSans
- title.FontSize = Enum.FontSize.Size14
- title.Text = "Stud Balance:"
- title.TextColor = BrickColor.new("Really black")
- title.TextColor3 = Color3.new(0, 0, 0)
- title.TextScaled = true
- title.TextSize = 14
- title.TextWrap = true
- title.TextWrapped = true
- frame1.Parent = screen
- frame1.Position = UDim2.new(0.00572153181, 0, 0.556220829, 0)
- frame1.Size = UDim2.new(0.127145588, 0, 0.0730948672, 0)
- frame1.BackgroundColor = BrickColor.new("Institutional white")
- frame1.BackgroundColor3 = Color3.new(1, 1, 1)
- frame1.BackgroundTransparency = 1
- silver.Name = "Silver"
- silver.Parent = frame1
- silver.Position = UDim2.new(-0.00499990582, 0, -0.0425531901, 0)
- silver.Size = UDim2.new(0.235000044, 0, 1, 0)
- silver.BackgroundColor = BrickColor.new("Tr. Flu. Red")
- silver.BackgroundColor3 = Color3.new(1, 0.65098, 0.717647)
- silver.BorderColor = BrickColor.new("Really black")
- silver.BorderColor3 = Color3.new(0, 0, 0)
- silver.Font = Enum.Font.SourceSans
- silver.FontSize = Enum.FontSize.Size14
- silver.Text = "Silver"
- silver.TextColor = BrickColor.new("Really black")
- silver.TextColor3 = Color3.new(0, 0, 0)
- silver.TextScaled = true
- silver.TextSize = 14
- silver.TextWrap = true
- silver.TextWrapped = true
- gold.Name = "Gold"
- gold.Parent = frame1
- gold.Position = UDim2.new(0.265000075, 0, -0.0425531901, 0)
- gold.Size = UDim2.new(0.235000044, 0, 1, 0)
- gold.BackgroundColor = BrickColor.new("Tr. Flu. Red")
- gold.BackgroundColor3 = Color3.new(1, 0.65098, 0.717647)
- gold.BorderColor = BrickColor.new("Really black")
- gold.BorderColor3 = Color3.new(0, 0, 0)
- gold.Font = Enum.Font.SourceSans
- gold.FontSize = Enum.FontSize.Size14
- gold.Text = "Gold"
- gold.TextColor = BrickColor.new("Really black")
- gold.TextColor3 = Color3.new(0, 0, 0)
- gold.TextScaled = true
- gold.TextSize = 14
- gold.TextWrap = true
- gold.TextWrapped = true
- blue.Name = "Blue"
- blue.Parent = frame1
- blue.Position = UDim2.new(0.535000086, 0, -0.0425531901, 0)
- blue.Size = UDim2.new(0.235000044, 0, 1, 0)
- blue.BackgroundColor = BrickColor.new("Tr. Flu. Red")
- blue.BackgroundColor3 = Color3.new(1, 0.65098, 0.717647)
- blue.BorderColor = BrickColor.new("Really black")
- blue.BorderColor3 = Color3.new(0, 0, 0)
- blue.Font = Enum.Font.SourceSans
- blue.FontSize = Enum.FontSize.Size14
- blue.Text = "Blue"
- blue.TextColor = BrickColor.new("Really black")
- blue.TextColor3 = Color3.new(0, 0, 0)
- blue.TextScaled = true
- blue.TextSize = 14
- blue.TextWrap = true
- blue.TextWrapped = true
- purple.Name = "Purple"
- purple.Parent = frame1
- purple.Position = UDim2.new(0.800000072, 0, -0.0425531901, 0)
- purple.Size = UDim2.new(0.235000044, 0, 1, 0)
- purple.BackgroundColor = BrickColor.new("Tr. Flu. Red")
- purple.BackgroundColor3 = Color3.new(1, 0.65098, 0.717647)
- purple.BorderColor = BrickColor.new("Really black")
- purple.BorderColor3 = Color3.new(0, 0, 0)
- purple.Font = Enum.Font.SourceSans
- purple.FontSize = Enum.FontSize.Size14
- purple.Text = "Purple"
- purple.TextColor = BrickColor.new("Really black")
- purple.TextColor3 = Color3.new(0, 0, 0)
- purple.TextScaled = true
- purple.TextSize = 14
- purple.TextWrap = true
- purple.TextWrapped = true
- toggle.Parent = screen
- toggle.Position = UDim2.new(0.00572153088, 0, 0.435458779, 0)
- toggle.Size = UDim2.new(0.0476795882, 0, 0.0471228547, 0)
- toggle.BackgroundColor = BrickColor.new("Persimmon")
- toggle.BackgroundColor3 = Color3.new(1, 0.235294, 0.247059)
- toggle.BorderColor = BrickColor.new("Really black")
- toggle.BorderColor3 = Color3.new(0, 0, 0)
- toggle.Font = Enum.Font.SourceSans
- toggle.FontSize = Enum.FontSize.Size14
- toggle.Text = "Close"
- toggle.TextColor = BrickColor.new("Really black")
- toggle.TextColor3 = Color3.new(0, 0, 0)
- toggle.TextScaled = true
- toggle.TextSize = 14
- toggle.TextWrap = true
- toggle.TextWrapped = true
- shop_toggle.Parent = screen
- shop_toggle.Position = UDim2.new(0.00489303051, 0, 0.636080861, 0)
- shop_toggle.Size = UDim2.new(0.0476795882, 0, 0.0471228547, 0)
- shop_toggle.BackgroundColor = BrickColor.new("Pastel brown")
- shop_toggle.BackgroundColor3 = Color3.new(1, 0.772549, 0.572549)
- shop_toggle.BorderColor = BrickColor.new("Really black")
- shop_toggle.BorderColor3 = Color3.new(0, 0, 0)
- shop_toggle.Font = Enum.Font.SourceSans
- shop_toggle.FontSize = Enum.FontSize.Size14
- shop_toggle.Text = "Shop (Soon)"
- shop_toggle.TextColor = BrickColor.new("Really black")
- shop_toggle.TextColor3 = Color3.new(0, 0, 0)
- shop_toggle.TextScaled = true
- shop_toggle.TextSize = 14
- shop_toggle.TextWrap = true
- shop_toggle.TextWrapped = true
- return shop_toggle,toggle,balance,screen,silver,gold,blue,purple
- end
- function update_gui(t,n)
- t.Text = tostring(n)
- end
- function setup(plr)
- spawn(function()
- repeat wait() until not plr or plr.Character
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- if hum.Health > 0 then else wait() setup(plr) return end
- local adding = true
- local studs,antistuds = char_setup(plr,char,hum)
- local shop_toggle,toggle,balance,gui,silver,gold,blue,purple = gui_setup(plr)
- local oldstuds = studs.Value
- local toggled = false
- spawn(function()
- while adding and studs do
- antistuds.Value = true
- studs.Value = studs.Value + 1
- oldstuds = studs.Value
- update_gui(balance,studs.Value)
- wait()
- antistuds.Value = false
- wait(1)
- end
- end)
- studs.Changed:Connect(function(prop)
- if (oldstuds-studs.Value > 0 or oldstuds-studs.Value < 0) and antistuds.Value ~= true then
- --print(antistuds.Value)
- --print("bad")
- studs.Value = oldstuds
- else
- --print("ok")
- oldstuds = studs.Value
- end
- update_gui(balance,studs.Value)
- end)
- shop_toggle.MouseButton1Click:Connect(function()
- -- open shop gui
- end)
- toggle.MouseButton1Click:Connect(function()
- if toggled then
- toggled = false
- toggle.Text = "Close"
- toggle.BackgroundColor3 = Color3.fromRGB(255, 60, 63)
- for _,ui in pairs(gui:GetChildren()) do
- if ui ~= toggle then
- ui.Visible = true
- end
- end
- elseif not toggled then
- toggled = true
- toggle.Text = "Open"
- toggle.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
- for _,ui in pairs(gui:GetChildren()) do
- if ui ~= toggle then
- ui.Visible = false
- end
- end
- end
- end)
- silver.MouseButton1Click:Connect(function()
- if gui and balance and silver and studs and studs.Value >= 10 and char and hum and hum.Health > 0 then
- spawn(function()
- drop(hum,10)
- end)
- end
- end)
- gold.MouseButton1Click:Connect(function()
- if gui and balance and gold and studs and studs.Value >= 100 and char and hum and hum.Health > 0 then
- spawn(function()
- drop(hum,100)
- end)
- end
- end)
- blue.MouseButton1Click:Connect(function()
- if gui and balance and blue and studs and studs.Value >= 1000 and char and hum and hum.Health > 0 then
- spawn(function()
- drop(hum,1000)
- end)
- end
- end)
- purple.MouseButton1Click:Connect(function()
- if gui and balance and purple and studs and studs.Value >= 10000 and char and hum and hum.Health > 0 then
- spawn(function()
- drop(hum,10000)
- end)
- end
- end)
- --c/print(workspace.YourCuteNoob.Humanoid['Studs Balance'].Value)
- --c/owner.Character.Humanoid['Studs Balance'].Value = 1/0
- hum.Died:Connect(function() adding = false drop(hum,studs.Value) update_gui(balance,0) end)
- --warn("loaded setup")
- end)
- end
- function starter_setup(plr)
- plr.CharacterAdded:Connect(function(char) pcall(function() plr['PlayerGui']["KrY's lego currency gui"]:Destroy() end) pcall(function() setup(plr) end) end)
- plr.CharacterRemoving:Connect(function(char) pcall(function() plr['PlayerGui']["KrY's lego currency gui"]:Destroy() end) end)
- end
- for _,plr in pairs(game:GetService("Players"):GetPlayers()) do
- if plr.Character then setup(plr) end
- starter_setup(plr)
- end
- game:GetService("Players").ChildAdded:connect(starter_setup)
Add Comment
Please, Sign In to add comment