Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Workspace.EventCurrency.ChildAdded:Connect(function(c)
- c.CanCollide = false
- c.Position = game.Players.LocalPlayer.Character.Head.Position
- end)
- CandyText = game.Players.LocalPlayer.PlayerGui.ScreenGui.UI.Shop.TopBar.UtilBar.EventCurrency.TextLabel
- StartA = tonumber(CandyText.Text)
- UI = Instance.new("ScreenGui", game.CoreGui)
- UI.Name = "Candy Counter"
- Frame = Instance.new("Frame", UI)
- Frame.Name = "CandyEvent"
- Frame.Size = UDim2.new(0.15, 0, 0.2, 0)
- Frame.Position = UDim2.new(0.3, 0, 0.1, 0)
- Frame.BackgroundColor3 = Color3.new(0, 1, 1)
- Frame.BackgroundTransparency = 0.6
- Frame.Draggable = true
- Frame.Active = true
- Bar = Instance.new("Frame", Frame)
- Bar.Name = "Bar"
- Bar.Size = UDim2.new(1, 0, 0.15, 0)
- Bar.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- Bar.BackgroundTransparency = 0.2
- Cand = Instance.new("TextLabel", Frame)
- Cand.Name = "Candy Counter Frame"
- Cand.Size = UDim2.new(0.8, 0, 0.2, 0)
- Cand.Position = UDim2.new(0.1, 0, 0.25, 0)
- Cand.TextScaled = true
- Cand.Text = "Candy: "..CandyText.Text
- Cand.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- Cand.BackgroundTransparency = 0.2
- Cand.TextColor3 = Color3.new(1, 1, 1)
- AddedCand = Instance.new("TextLabel", Frame)
- AddedCand.Name = "Added Candy Frame"
- AddedCand.Size = UDim2.new(0.8, 0, 0.2, 0)
- AddedCand.Position = UDim2.new(0.1, 0, 0.65, 0)
- AddedCand.TextScaled = true
- AddedCand.Text = "Candy Added: 0"
- AddedCand.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- AddedCand.BackgroundTransparency = 0.2
- AddedCand.TextColor3 = Color3.new(1, 1, 1)
- CandyText:GetPropertyChangedSignal("Text"):connect(function()
- if tonumber(CandyText.Text)<StartA then
- StartA = tonumber(CandyText.Text)
- print("Lower")
- end
- Cand.Text = "Candy: "..CandyText.Text
- AddedCand.Text = "Candy Added: ".. tostring(tonumber(CandyText.Text) - StartA)
- end)
Advertisement
Add Comment
Please, Sign In to add comment