Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --brick color = Pastel Blue
- --brick material = forcefield
- local mud = Instance.new("Part")
- mud.Name = "Mud"
- mud.Material = Enum.Material.Glass
- mud.BrickColor = BrickColor.new("Pastel Blue")
- mud.Anchored = true
- mud.Size = Vector3.new(20, 10, 2)
- mud.CFrame = CFrame.new(0, 5, -20)
- mud.Parent = script
- local click = Instance.new("ClickDetector")
- click.Name = "Collect"
- click.Parent = mud
- local function Tag(click, Text, Type)
- click.MouseHoverEnter:Connect(function(plr)
- local gui = Instance.new("ScreenGui")
- gui.Name = "MudInfo"
- gui.Parent = plr.PlayerGui
- local text = Instance.new("TextLabel")
- text.Name = "Mud"
- text.BorderSizePixel = 0
- text.BackgroundColor3 = Color3.new(1, 1, 1)
- text.Size = UDim2.new(0, 200, 0, 50)
- text.Position = UDim2.new(1, -210, 1, -60)
- text.ZIndex = 2
- text.Font = Enum.Font.SourceSansSemibold
- if Type == "Normal" then
- text.Text = Text
- end
- if Type == "Click" then
- if click.Parent:FindFirstChild("MudJoint") and click.Parent.MudJoint.Part0.Parent.Name == plr.Name then
- text.Text = "Drop"
- else
- text.Text = Text
- end
- end
- text.TextColor3 = Color3.new(1, 1, 1)
- text.TextStrokeTransparency = 0
- text.TextScaled = true
- text.Parent = gui
- local shade = Instance.new("Frame")
- shade.Name = "Shade"
- shade.BorderSizePixel = 0
- shade.BackgroundColor3 = Color3.new(0, 0, 0)
- shade.Size = UDim2.new(0, 200, 0, 50)
- shade.Position = UDim2.new(1, -204, 1, -54)
- shade.Parent = gui
- end)
- click.MouseHoverLeave:Connect(function(plr)
- if plr.PlayerGui:FindFirstChild("MudInfo") then
- plr.PlayerGui.MudInfo:Destroy()
- end
- end)
- end
- Tag(click, "Mud", "Normal")
- click.MouseClick:Connect(function(plr)
- if plr.Character and plr.Character:FindFirstChild("Torso") and not plr.Character.Torso:FindFirstChild("TempRS") then
- local char = plr.Character
- local tors = char.Torso
- local ra = char["Right Arm"]
- local la = char["Left Arm"]
- local RS = Instance.new("Weld")
- RS.Name = "TempRS"
- RS.Part0 = tors
- RS.Part1 = ra
- 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)
- RS.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RS.Parent = tors
- local LS = Instance.new("Weld")
- LS.Name = "TempLS"
- LS.Part0 = tors
- LS.Part1 = la
- 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)
- LS.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LS.Parent = tors
- local mudpiece = Instance.new("Part")
- mudpiece.Name = "Mud"
- mudpiece.Material = Enum.Material.Glass
- mudpiece.BrickColor = BrickColor.new("Pastel Blue")
- mudpiece.Size = Vector3.new(3, 3, 3)
- mudpiece.Shape = Enum.PartType.Ball
- mudpiece.Parent = script
- local weld = Instance.new("Weld")
- weld.Name = "MudJoint"
- weld.Part0 = tors
- weld.Part1 = mudpiece
- weld.C0 = CFrame.new(0, -0.5, -3)
- weld.Parent = mudpiece
- local click = Instance.new("ClickDetector")
- click.Name = "Tag"
- click.Parent = mudpiece
- Tag(click, "Mud", "Click")
- click.MouseClick:Connect(function(player)
- if mudpiece:FindFirstChildOfClass("Weld") then
- if player == plr then
- weld:Destroy()
- RS:Destroy()
- LS:Destroy()
- end
- else
- char = player.Character
- tors = char.Torso
- ra = char["Right Arm"]
- la = char["Left Arm"]
- RS = Instance.new("Weld")
- RS.Name = "TempRS"
- RS.Part0 = tors
- RS.Part1 = ra
- 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)
- RS.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RS.Parent = tors
- LS = Instance.new("Weld")
- LS.Name = "TempLS"
- LS.Part0 = tors
- LS.Part1 = la
- 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)
- LS.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LS.Parent = tors
- weld = Instance.new("Weld")
- weld.Name = "MudJoint"
- weld.Part0 = tors
- weld.Part1 = mudpiece
- weld.C0 = CFrame.new(0, -0.5, -3)
- weld.Parent = mudpiece
- plr = player
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement