SHOW:
|
|
- or go back to the newest paste.
1 | -- Configuration ------------------------------------------------------------------------------------------ | |
2 | - | local mapDirectory = game.Lighting.Maps -- This is where your maps are! |
2 | + | local mapDirectory = game.Lighting.Maps -sword fights on the heights original- This is where your maps are! |
3 | local msg = Instance.new("Message") | |
4 | msg.Parent = game.Lighting | |
5 | local time = 60 | |
6 | local text = "Changing map.." | |
7 | -- Script ---------------------------------------------------------------------------------------------------- | |
8 | ||
9 | ||
10 | ||
11 | while true do | |
12 | local maps = mapDirectory:getChildren() | |
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | if #maps == 0 then | |
21 | print("Maps not found! Selfremoving...") | |
22 | --script:remove() | |
23 | return | |
24 | end | |
25 | ||
26 | ||
27 | ||
28 | local pickedMap = maps[math.random(1, #maps)] | |
29 | local pickedMapClone = pickedMap:clone() | |
30 | pickedMapClone:makeJoints() | |
31 | msg.Parent = game.Workspace | |
32 | msg.Text = "Map Change!" | |
33 | wait(3) | |
34 | msg.Text = text --"Picked Map is " ..pickedMapClone.Name.."." | |
35 | print("Map inserted: " .. pickedMap.Name) | |
36 | wait(5) | |
37 | ||
38 | msg.Parent = game.Lighting | |
39 | wait(time) | |
40 | pickedMapClone:remove() | |
41 | ||
42 | ||
43 | end |