Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = owner
- local part = Instance.new("Part",workspace)
- part.Size = Vector3.new(1.5,1.5,1.5)
- part.Color = Color3.fromRGB(255,0,0)
- part.Anchored = true
- part.Material = Enum.Material.Neon
- local click = Instance.new("ClickDetector",part)
- -- Objects
- local BillboardGui = Instance.new("BillboardGui")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextBox")
- -- Properties
- BillboardGui.Parent = part
- BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- BillboardGui.Active = true
- BillboardGui.Size = UDim2.new(5, 0, 2, 0)
- BillboardGui.StudsOffset = Vector3.new(0, 5, 0)
- Frame.Parent = BillboardGui
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame.Size = UDim2.new(1, 0, 1, 0)
- TextLabel.Parent = BillboardGui
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.Size = UDim2.new(1, 0, 1, 0)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "I have been clicked 0 times"
- TextLabel.TextColor3 = Color3.new(0, 0, 0)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- -- Scripts
- local r = 255
- local g = 0
- local b = 0
- local num = 0
- function shiftcolor()
- if r == 255 and g < 255 and b == 0 then
- g = g + 1
- elseif r > 0 and g == 255 then
- r = r - 1
- elseif g == 255 and b < 255 then
- b = b + 1
- elseif g > 0 and b == 255 then
- g = g - 1
- elseif b == 255 and r < 255 then
- r = r + 1
- elseif b > 0 and r == 255 then
- b = b - 1
- end
- end
- click.MouseClick:Connect(function()
- shiftcolor()
- num = num + 1
- TextLabel.Text = "I have been clicked\n"..tostring(num).."\ntimes"
- TextLabel.BackgroundColor3 = Color3.fromRGB(r,g,b)
- part.Color = Color3.fromRGB(r,g,b)
- end)
- while wait() do
- part.CFrame = player.Character.Head.CFrame * CFrame.new(0,4.74,0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement