View difference between Paste ID: GwGfiM25 and 0022nGdx
SHOW: | | - or go back to the newest paste.
1-
--brick color = Terra Cotta
1+
--brick color = Bright blue
2-
--brick material = concrete
2+
--brick material = neon
3
4
local mud = Instance.new("Part")
5
mud.Name = "Mud"
6
mud.Material = Enum.Material.Neon
7
mud.BrickColor = BrickColor.new("Bright blue")
8
mud.Anchored = true
9
mud.Size = Vector3.new(20, 10, 2)
10
mud.CFrame = CFrame.new(0, 5, -20)
11
mud.Parent = script
12
local click = Instance.new("ClickDetector")
13
click.Name = "Collect"
14
click.Parent = mud
15
local function Tag(click, Text, Type)
16
	click.MouseHoverEnter:Connect(function(plr)
17
		local gui = Instance.new("ScreenGui")
18
		gui.Name = "MudInfo"
19
		gui.Parent = plr.PlayerGui
20
		local text = Instance.new("TextLabel")
21
		text.Name = "Mud"
22
		text.BorderSizePixel = 0
23
		text.BackgroundColor3 = Color3.new(1, 1, 1)
24
		text.Size = UDim2.new(0, 200, 0, 50)
25
		text.Position = UDim2.new(1, -210, 1, -60)
26
		text.ZIndex = 2
27
		text.Font = Enum.Font.SourceSansSemibold
28
		if Type == "Normal" then
29
			text.Text = Text
30
		end
31
		if Type == "Click" then
32
			if click.Parent:FindFirstChild("MudJoint") and click.Parent.MudJoint.Part0.Parent.Name == plr.Name then
33
				text.Text = "Drop"
34
			else
35
				text.Text = Text
36
			end
37
		end
38
		text.TextColor3 = Color3.new(1, 1, 1)
39
		text.TextStrokeTransparency = 0
40
		text.TextScaled = true
41
		text.Parent = gui
42
		local shade = Instance.new("Frame")
43
		shade.Name = "Shade"
44
		shade.BorderSizePixel = 0
45
		shade.BackgroundColor3 = Color3.new(0, 0, 0)
46
		shade.Size = UDim2.new(0, 200, 0, 50)
47
		shade.Position = UDim2.new(1, -204, 1, -54)
48
		shade.Parent = gui
49
	end)
50
	click.MouseHoverLeave:Connect(function(plr)
51
		if plr.PlayerGui:FindFirstChild("MudInfo") then
52
			plr.PlayerGui.MudInfo:Destroy()
53
		end
54
	end)
55
end
56
Tag(click, "Mud", "Normal")
57
click.MouseClick:Connect(function(plr)
58
	if plr.Character and plr.Character:FindFirstChild("Torso") and not plr.Character.Torso:FindFirstChild("TempRS") then
59
		local char = plr.Character
60
		local tors = char.Torso
61
		local ra = char["Right Arm"]
62
		local la = char["Left Arm"]
63
		local RS = Instance.new("Weld")
64
		RS.Name = "TempRS"
65
		RS.Part0 = tors
66
		RS.Part1 = ra
67
		RS.C0 = CFrame.new(0.8, 0.5, -0.5, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.Angles(0, 0.5, 1)
68
		RS.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
69
		RS.Parent = tors
70
		local LS = Instance.new("Weld")
71
		LS.Name = "TempLS"
72
		LS.Part0 = tors
73
		LS.Part1 = la
74
		LS.C0 = CFrame.new(-0.8, 0.5, -0.5, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.Angles(0, -0.5, -1)
75
		LS.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
76
		LS.Parent = tors
77
		local mudpiece = Instance.new("Part")
78
		mudpiece.Name = "Mud"
79-
		mudpiece.Material = Enum.Material.Grass
79+
		mudpiece.Material = Enum.Material.Neon
80-
		mudpiece.BrickColor = BrickColor.new("Pine Cone")
80+
		mudpiece.BrickColor = BrickColor.new("Bright blue)
81
		mudpiece.Size = Vector3.new(3, 3, 3)
82
		mudpiece.Shape = Enum.PartType.Ball
83
		mudpiece.Parent = script
84
		local weld = Instance.new("Weld")
85
		weld.Name = "MudJoint"
86
		weld.Part0 = tors
87
		weld.Part1 = mudpiece
88
		weld.C0 = CFrame.new(0, -0.5, -3)
89
		weld.Parent = mudpiece
90
		local click = Instance.new("ClickDetector")
91
		click.Name = "Tag"
92
		click.Parent = mudpiece
93
		Tag(click, "Mud", "Click")
94
		click.MouseClick:Connect(function(player)
95
			if mudpiece:FindFirstChildOfClass("Weld") then
96
				if player == plr then
97
					weld:Destroy()
98
					RS:Destroy()
99
					LS:Destroy()
100
				end
101
			else
102
				char = player.Character
103
				tors = char.Torso
104
				ra = char["Right Arm"]
105
				la = char["Left Arm"]
106
				RS = Instance.new("Weld")
107
				RS.Name = "TempRS"
108
				RS.Part0 = tors
109
				RS.Part1 = ra
110
				RS.C0 = CFrame.new(0.8, 0.5, -0.5, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.Angles(0, 0.5, 1)
111
				RS.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
112
				RS.Parent = tors
113
				LS = Instance.new("Weld")
114
				LS.Name = "TempLS"
115
				LS.Part0 = tors
116
				LS.Part1 = la
117
				LS.C0 = CFrame.new(-0.8, 0.5, -0.5, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.Angles(0, -0.5, -1)
118
				LS.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
119
				LS.Parent = tors
120
				weld = Instance.new("Weld")
121
				weld.Name = "MudJoint"
122
				weld.Part0 = tors
123
				weld.Part1 = mudpiece
124
				weld.C0 = CFrame.new(0, -0.5, -3)
125
				weld.Parent = mudpiece
126
				plr = player
127
			end
128
		end)
129
	end
130
end)