Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sizex = script.Base.Size.x/2
- offx = script.Base.Position.x
- sizez = script.Base.Size.z/2
- offz = script.Base.Position.z
- sizey = script.Base.Position.y+50
- tix = script.TIX:clone()
- bux = script.BUX:clone()
- script.TIX:remove()
- script.BUX:remove()
- game.Players.ChildAdded:connect(function(player)
- local stats = Instance.new("IntValue")
- stats.Name = "leaderstats"
- local c = Instance.new("IntValue")
- c.Name = "Cash"
- c.Value = 0
- c.Parent = stats
- stats.Parent = player
- end)
- function Collide(part, val)
- part.Touched:connect(function(hit)
- if not hit.Parent then return end
- p = game.Players:GetPlayerFromCharacter(hit.Parent)
- if not p then return end
- p.leaderstats.Cash.Value = p.leaderstats.Cash.Value+val
- part:remove()
- end)
- wait(15)
- part:remove()
- end
- script.Flip.Changed:connect(function()
- r = math.random(1,10)
- if r == 10 then
- vall = 10
- t = bux:clone()
- else
- vall = 1
- t = tix:clone()
- end
- t.Parent = game.Workspace
- t.Position = Vector3.new(math.random(-1*sizex, sizex)+offx, sizey, math.random(-1*sizez, sizez)+offz)
- t.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
- t.RotVelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
- Collide(t, vall)
- end)
- while true do
- script.Flip.Value = not script.Flip.Value
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment