Walterin0

Untitled

Oct 26th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. game.Workspace.EventCurrency.ChildAdded:Connect(function(c)
  2. c.CanCollide = false
  3. c.Position = game.Players.LocalPlayer.Character.Head.Position
  4. end)
  5.  
  6. CandyText = game.Players.LocalPlayer.PlayerGui.ScreenGui.UI.Shop.TopBar.UtilBar.EventCurrency.TextLabel
  7. StartA = tonumber(CandyText.Text)
  8.  
  9. UI = Instance.new("ScreenGui", game.CoreGui)
  10. UI.Name = "Candy Counter"
  11.  
  12. Frame = Instance.new("Frame", UI)
  13. Frame.Name = "CandyEvent"
  14. Frame.Size = UDim2.new(0.15, 0, 0.2, 0)
  15. Frame.Position = UDim2.new(0.3, 0, 0.1, 0)
  16. Frame.BackgroundColor3 = Color3.new(0, 1, 1)
  17. Frame.BackgroundTransparency = 0.6
  18. Frame.Draggable = true
  19. Frame.Active = true
  20.  
  21. Bar = Instance.new("Frame", Frame)
  22. Bar.Name = "Bar"
  23. Bar.Size = UDim2.new(1, 0, 0.15, 0)
  24. Bar.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  25. Bar.BackgroundTransparency = 0.2
  26.  
  27. Cand = Instance.new("TextLabel", Frame)
  28. Cand.Name = "Candy Counter Frame"
  29. Cand.Size = UDim2.new(0.8, 0, 0.2, 0)
  30. Cand.Position = UDim2.new(0.1, 0, 0.25, 0)
  31. Cand.TextScaled = true
  32. Cand.Text = "Candy: "..CandyText.Text
  33. Cand.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  34. Cand.BackgroundTransparency = 0.2
  35. Cand.TextColor3 = Color3.new(1, 1, 1)
  36.  
  37. AddedCand = Instance.new("TextLabel", Frame)
  38. AddedCand.Name = "Added Candy Frame"
  39. AddedCand.Size = UDim2.new(0.8, 0, 0.2, 0)
  40. AddedCand.Position = UDim2.new(0.1, 0, 0.65, 0)
  41. AddedCand.TextScaled = true
  42. AddedCand.Text = "Candy Added: 0"
  43. AddedCand.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  44. AddedCand.BackgroundTransparency = 0.2
  45. AddedCand.TextColor3 = Color3.new(1, 1, 1)
  46.  
  47. CandyText:GetPropertyChangedSignal("Text"):connect(function()
  48. if tonumber(CandyText.Text)<StartA then
  49. StartA = tonumber(CandyText.Text)
  50. print("Lower")
  51. end
  52. Cand.Text = "Candy: "..CandyText.Text
  53. AddedCand.Text = "Candy Added: ".. tostring(tonumber(CandyText.Text) - StartA)
  54. end)
Advertisement
Add Comment
Please, Sign In to add comment