Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local m = Instance.new("Model")
- m.Parent = game.Workspace
- m.Name = ("Pillars")
- function onKeyPress(inputObject, gameProcessedEvent)
- local key = inputObject.KeyCode
- if key == Enum.KeyCode.R then
- local p = Instance.new("Part")
- p.Size = Vector3.new(10, 0.05, 10)
- p.Parent = game.Workspace.Pillars
- p.Anchored = true
- p.CFrame = mouse.Hit
- p.Orientation = Vector3.new(0, p.Orientation.Y, 0)
- p.TopSurface = ("Smooth")
- p.BottomSurface = ("Smooth")
- p.Reflectance = (0.2)
- local v = Instance.new("NumberValue")
- v.Parent = p
- v.Name = ("MaxHeight")
- v.Value = (math.random(250,600))
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
- while true do
- wait(0.01)
- for i,v in pairs(m:GetChildren()) do
- if v.ClassName == ("Part") then
- if v.Size.Y <= (v.MaxHeight.Value) then
- v.CanCollide = false
- v.Size = v.Size + Vector3.new(0.02, 7.5, 0.02)
- v.CanCollide = true
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement