SHOW:
|
|
- or go back to the newest paste.
1 | local player = game.Players.LocalPlayer | |
2 | local mouse = player:GetMouse() | |
3 | ||
4 | local m = Instance.new("Model") | |
5 | m.Parent = game.Workspace | |
6 | m.Name = ("Pillars") | |
7 | ||
8 | function onKeyPress(inputObject, gameProcessedEvent) | |
9 | local key = inputObject.KeyCode | |
10 | if key == Enum.KeyCode.R then | |
11 | local p = Instance.new("Part") | |
12 | p.Size = Vector3.new(10, 0.05, 10) | |
13 | p.Parent = game.Workspace.Pillars | |
14 | p.Anchored = true | |
15 | p.CFrame = mouse.Hit | |
16 | p.Orientation = Vector3.new(0, p.Orientation.Y, 0) | |
17 | p.TopSurface = ("Smooth") | |
18 | p.BottomSurface = ("Smooth") | |
19 | p.Reflectance = (0.2) | |
20 | local v = Instance.new("NumberValue") | |
21 | v.Parent = p | |
22 | v.Name = ("MaxHeight") | |
23 | v.Value = (math.random(250,600)) | |
24 | end | |
25 | end | |
26 | ||
27 | game:GetService("UserInputService").InputBegan:connect(onKeyPress) | |
28 | ||
29 | local m1 = Instance.new("Model") | |
30 | m1.Parent = game.Workspace | |
31 | m1.Name = ("BigBoys") | |
32 | ||
33 | function onKeyPress(inputObject, gameProcessedEvent) | |
34 | local key = inputObject.KeyCode | |
35 | - | v.Size = v.Size + Vector3.new(0.02, 7.5, 0.02) |
35 | + | if key == Enum.KeyCode.T then |
36 | local p = Instance.new("Part") | |
37 | p.Size = Vector3.new(0.05, 0.05, 0.05) | |
38 | p.Parent = game.Workspace.BigBoys | |
39 | p.Anchored = true | |
40 | p.CFrame = mouse.Hit | |
41 | p.Orientation = Vector3.new(0, p.Orientation.Y, 0) | |
42 | p.TopSurface = ("Smooth") | |
43 | p.BottomSurface = ("Smooth") | |
44 | p.Reflectance = (0.2) | |
45 | local v = Instance.new("NumberValue") | |
46 | v.Parent = p | |
47 | v.Name = ("MaxHeight") | |
48 | v.Value = (math.random(250,600)) | |
49 | end | |
50 | end | |
51 | ||
52 | game:GetService("UserInputService").InputBegan:connect(onKeyPress) | |
53 | ||
54 | while true do | |
55 | wait(0.01) | |
56 | for i,v in pairs(m1:GetChildren()) do | |
57 | if v.ClassName == ("Part") then | |
58 | if v.Size.Y <= (2000) then | |
59 | v.CanCollide = false | |
60 | v.Size = v.Size * Vector3.new(1.02, 1.02, 1.02) | |
61 | v.CanCollide = true | |
62 | end | |
63 | end | |
64 | end | |
65 | wait(0.01) | |
66 | for i,v in pairs(m:GetChildren()) do | |
67 | if v.ClassName == ("Part") then | |
68 | if v.Size.Y <= (v.MaxHeight.Value) then | |
69 | v.CanCollide = false | |
70 | v.Size = v.Size + Vector3.new(0,7.5,0) | |
71 | v.CanCollide = true | |
72 | end | |
73 | end | |
74 | end | |
75 | end |