SHOW:
|
|
- or go back to the newest paste.
1 | --------------------------- | |
2 | --Created by DJwaffle2005-- | |
3 | --------------------------- | |
4 | wait(0.1) | |
5 | ||
6 | - | player = game.Players.PutYourNameHere |
6 | + | player = game.Players.xXxKingOfAwsomenessx |
7 | - | workspacePlayer = game.Workspace.PutYourNameHere |
7 | + | workspacePlayer = game.Workspace.xXxKingOfAwsomenessx |
8 | ||
9 | local ff = Instance.new("ForceField") --Creates forcefield | |
10 | ff.Parent = workspacePlayer | |
11 | ||
12 | workspacePlayer.Humanoid.WalkSpeed = 30 | |
13 | ||
14 | local tool1 = Instance.new("HopperBin") --Gives the player a grab tool. | |
15 | tool1.Name = "Grab" | |
16 | tool1.Parent = player.Backpack | |
17 | tool1.BinType = "Grab" | |
18 | print("Gave grab tool") | |
19 | ||
20 | local tool2 = Instance.new("HopperBin") --Gives the player a clone tool. | |
21 | tool2.Name = "Clone" | |
22 | tool2.Parent = player.Backpack | |
23 | tool2.BinType = "Clone" | |
24 | print("Gave clone tool") | |
25 | ||
26 | local tool3 = Instance.new("HopperBin") --Gives the player a destroy tool. | |
27 | tool3.Name = "Hammer" | |
28 | tool3.Parent = player.Backpack | |
29 | tool3.BinType = "Hammer" | |
30 | print("Gave delete tool") | |
31 | ||
32 | local tool4 = Instance.new("HopperBin") --Gives the player a tool where it spawns a part. | |
33 | tool4.Name = "New Part" | |
34 | tool4.Parent = player.Backpack | |
35 | tool4.BinType = "Script" | |
36 | print("Gave new part tool") | |
37 | ||
38 | local tool5 = Instance.new("HopperBin") --Gives the player a tool where it spawns a part. | |
39 | tool5.Name = "Paint" | |
40 | tool5.Parent = player.Backpack | |
41 | tool5.BinType = "Script" | |
42 | print("Gave paint tool") | |
43 | ||
44 | local tool6 = Instance.new("HopperBin") --Gives the player a tool where it spawns a part. | |
45 | tool6.Name = "Anchor" | |
46 | tool6.Parent = player.Backpack | |
47 | tool6.BinType = "Script" | |
48 | print("Gave anchor tool") | |
49 | ||
50 | local tool7 = Instance.new("HopperBin") --Gives the player a tool where it spawns a part. | |
51 | tool7.Name = "Un-Anchor" | |
52 | tool7.Parent = player.Backpack | |
53 | tool7.BinType = "Script" | |
54 | print("Gave un-anchor tool") | |
55 | ||
56 | local tool8 = Instance.new("HopperBin") --Gives the player a tool where it spawns a part. | |
57 | tool8.Name = "Lock" | |
58 | tool8.Parent = player.Backpack | |
59 | tool8.BinType = "Script" | |
60 | print("Gave lock tool") | |
61 | ||
62 | local tool9 = Instance.new("HopperBin") --Gives the player a tool where it spawns a part. | |
63 | tool9.Name = "Unlock" | |
64 | tool9.Parent = player.Backpack | |
65 | tool9.BinType = "Script" | |
66 | print("Gave unlock tool") | |
67 | ||
68 | playerMouse = game.Players.LocalPlayer:GetMouse() | |
69 | ||
70 | ||
71 | --Functions-- | |
72 | function lock() | |
73 | playerMouse.Target.Locked = true | |
74 | print("Locked "..playerMouse.Target.Name) | |
75 | end | |
76 | ||
77 | function unlock() | |
78 | playerMouse.Target.Locked = false | |
79 | print("Unlocked "..playerMouse.Target.Name) | |
80 | end | |
81 | ||
82 | function anchor() | |
83 | playerMouse.Target.Anchored = true | |
84 | print("Anchored "..playerMouse.Target.Name) | |
85 | end | |
86 | ||
87 | function unanchor() | |
88 | playerMouse.Target.Anchored = false | |
89 | print("Un-anchored "..playerMouse.Target.Name) | |
90 | end | |
91 | ||
92 | function paint() | |
93 | playerMouse.Target.BrickColor = BrickColor.Random() | |
94 | end | |
95 | ||
96 | function create(mouse) | |
97 | local part = Instance.new("Part") | |
98 | part.Parent = game.Workspace | |
99 | part.Position = player.Head.Position | |
100 | part.Anchored = true | |
101 | part.Locked = false | |
102 | print("Created a new part.") | |
103 | end | |
104 | ||
105 | ------------------------ | |
106 | ||
107 | --Events- | |
108 | ||
109 | tool4.Selected:connect(function(mouse) | |
110 | print("Selected.") | |
111 | mouse.Button1Down:connect(create) | |
112 | end) | |
113 | ||
114 | tool5.Selected:connect(function(mouse) | |
115 | print("Selected.") | |
116 | mouse.Button1Down:connect(paint) | |
117 | end) | |
118 | ||
119 | tool6.Selected:connect(function(mouse) | |
120 | print("Selected.") | |
121 | mouse.Button1Down:connect(anchor) | |
122 | end) | |
123 | ||
124 | tool7.Selected:connect(function(mouse) | |
125 | print("Selected.") | |
126 | mouse.Button1Down:connect(unanchor) | |
127 | end) | |
128 | ||
129 | tool8.Selected:connect(function(mouse) | |
130 | print("Selected.") | |
131 | mouse.Button1Down:connect(lock) | |
132 | end) | |
133 | ||
134 | tool9.Selected:connect(function(mouse) | |
135 | print("Selected.") | |
136 | mouse.Button1Down:connect(unlock) | |
137 | end) | |
138 | ||
139 | print("Gave tools to "..player.Name..".") |