Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[| |]--
- --[| Created by ByJugator340 |]--
- --[| |]--
- --------------------------------------------
- --||||||||||||||Start Variables||||||||||--
- --------------------------------------------
- local character = owner.Character
- local raining = false
- local new = Instance.new
- local ro = owner.Character.HumanoidRootPart
- --------------------------------------------
- --||||||||||||||End Variables|||||||||||||--
- --------------------------------------------
- local tool = new("Tool",owner.Backpack)
- tool.RequiresHandle = true
- tool.CanBeDropped = false
- tool.TextureId = "rbxassetid://43996751"
- tool.GripPos = Vector3.new(0, -3.2, 0)
- tool.GripRight = Vector3.new(0,0,1)
- tool.GripUp = Vector3.new(0,1,0)
- tool.GripForward = Vector3.new(1,0,0)
- local rainsound =new("Sound",character)
- rainsound.SoundId = "rbxassetid://130852656"
- rainsound.Volume = 5
- rainsound.Looped = true
- local actualsong = new("Sound",ro)
- actualsong.SoundId = "rbxassetid://270093405"
- actualsong.Volume = 0.9
- actualsong.Looped = true
- local morning = new("Sound",character)
- morning.SoundId = "rbxassetid://1844291580"
- morning.Volume = 0.5
- morning.Looped = false
- --------------------------------------------
- --Start Perfection weld thingy-- --credits to Quenty
- --------------------------------------------
- local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(tool) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- --- Weld's 2 parts together
- -- @param Part0 The first part
- -- @param Part1 The second part (Dependent part most of the time).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
- -- @return The weld created.
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
- -- @param MainPart The part to weld the model to (can be in the model).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(tool)
- local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or tool:IsA("Model") and tool.PrimaryPart or Parts[1]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- tool.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- --------------------------------------------
- --|||||||||Start Handle creation||||||||||--
- --------------------------------------------
- Part0 = Instance.new("Part")
- SpecialMesh1 = Instance.new("SpecialMesh")
- Part0.Name = "Handle"
- Part0.Parent = tool
- Part0.CFrame = CFrame.new(16.7585678, 160.961426, 218.850754, 0.509893417, -0.860237598, 5.08129597e-05, -3.12626362e-05, -7.76052475e-05, -0.99999994, 0.860237598, 0.509893358, -6.63995743e-05)
- Part0.Orientation = Vector3.new(89.9800034, 142.570007, -158.059998)
- Part0.Position = Vector3.new(16.7585678, 160.961426, 218.850754)
- Part0.Rotation = Vector3.new(90, 0, 59.3400002)
- Part0.Color = Color3.new(0, 0.560784, 0.611765)
- Part0.Size = Vector3.new(6, 6, 6)
- Part0.BrickColor = BrickColor.new("Bright bluish green")
- Part0.brickColor = BrickColor.new("Bright bluish green")
- Part0.FormFactor = Enum.FormFactor.Custom
- Part0.formFactor = Enum.FormFactor.Custom
- SpecialMesh1.Parent = Part0
- SpecialMesh1.MeshId = "http://www.roblox.com/asset/?id=43996518"
- SpecialMesh1.Scale = Vector3.new(1.89999998, 1.89999998, 1.89999998)
- SpecialMesh1.TextureId = "http://www.roblox.com/asset/?id=43996783"
- SpecialMesh1.MeshType = Enum.MeshType.FileMesh
- --------------------------------------
- --||||||||End Handle creation|||||||--
- --------------------------------------
- --------------------------------------
- --||||||Start Effects creation||||||--
- --------------------------------------
- tool.Equipped:Connect(function()
- raining = true
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- ParticleEmitter2 = Instance.new("ParticleEmitter")
- Part3 = Instance.new("Part")
- ParticleEmitter4 = Instance.new("ParticleEmitter")
- Part5 = Instance.new("Part")
- ParticleEmitter6 = Instance.new("ParticleEmitter")
- Part7 = Instance.new("Part")
- ParticleEmitter8 = Instance.new("ParticleEmitter")
- Part9 = Instance.new("Part")
- ParticleEmitter10 = Instance.new("ParticleEmitter")
- Part11 = Instance.new("Part")
- ParticleEmitter12 = Instance.new("ParticleEmitter")
- Model0.Name = "rain"
- Model0.Parent = ro
- Part1.Name = "f"
- Part1.Parent = Model0
- Part1.Orientation = Vector3.new(1.13999999, 90, 180)
- Part1.Position = Vector3.new(-22.4446373, -128.077408, -167.400482)
- Part1.Rotation = Vector3.new(90.0100021, 88.8600006, 89.9899979)
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(4.33813095, 2.13773704, 15.4801636)
- Part1.Anchored = true
- Part1.BrickColor = BrickColor.new("Black")
- Part1.CanCollide = false
- Part1.Material = Enum.Material.Slate
- Part1.brickColor = BrickColor.new("Black")
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter2.Parent = Part1
- ParticleEmitter2.Speed = NumberRange.new(0, 0)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(0.666667, 1, 1))
- ParticleEmitter2.Texture = "http://www.roblox.com/asset/?id=241876428"
- ParticleEmitter2.Transparency = NumberSequence.new(0.84375,0.41874998807907,0.63125002384186,0.44374996423721,0.60000002384186)
- ParticleEmitter2.Size = NumberSequence.new(2,2)
- ParticleEmitter2.Acceleration = Vector3.new(0, -50, 0)
- ParticleEmitter2.Lifetime = NumberRange.new(999, 1000)
- ParticleEmitter2.Rate = 500
- ParticleEmitter2.SpreadAngle = Vector2.new(10, 10)
- ParticleEmitter2.VelocitySpread = 10
- Part3.Name = "d"
- Part3.Parent = Model0
- Part3.Orientation = Vector3.new(1.13999999, 90, 180)
- Part3.Position = Vector3.new(-16.1427422, -127.257996, -161.724457)
- Part3.Rotation = Vector3.new(90.0100021, 88.8600006, 89.9899979)
- Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part3.Transparency = 1
- Part3.Size = Vector3.new(9.05589581, 2.13773704, 15.8487396)
- Part3.Anchored = true
- Part3.BrickColor = BrickColor.new("Black")
- Part3.CanCollide = false
- Part3.Material = Enum.Material.Slate
- Part3.brickColor = BrickColor.new("Black")
- Part3.FormFactor = Enum.FormFactor.Symmetric
- Part3.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter4.Parent = Part3
- ParticleEmitter4.Speed = NumberRange.new(0, 0)
- ParticleEmitter4.Color = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(0.666667, 1, 1))
- ParticleEmitter4.Texture = "http://www.roblox.com/asset/?id=241876428"
- ParticleEmitter4.Transparency = NumberSequence.new(0.84375,0.41874998807907,0.63125002384186,0.44374996423721,0.60000002384186)
- ParticleEmitter4.Size = NumberSequence.new(2,2)
- ParticleEmitter4.Acceleration = Vector3.new(0, -50, 0)
- ParticleEmitter4.Lifetime = NumberRange.new(999, 1000)
- ParticleEmitter4.Rate = 500
- ParticleEmitter4.SpreadAngle = Vector2.new(10, 10)
- ParticleEmitter4.VelocitySpread = 10
- Part5.Name = "e"
- Part5.Parent = Model0
- Part5.Orientation = Vector3.new(1.13999999, 90, 180)
- Part5.Position = Vector3.new(-28.3418236, -126.382156, -158.960129)
- Part5.Rotation = Vector3.new(90.0100021, 88.8600006, 89.9899979)
- Part5.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part5.Transparency = 1
- Part5.Size = Vector3.new(15.7639656, 2.13773704, 15.4801636)
- Part5.Anchored = true
- Part5.BrickColor = BrickColor.new("Black")
- Part5.CanCollide = false
- Part5.Material = Enum.Material.Slate
- Part5.brickColor = BrickColor.new("Black")
- Part5.FormFactor = Enum.FormFactor.Symmetric
- Part5.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter6.Parent = Part5
- ParticleEmitter6.Speed = NumberRange.new(0, 0)
- ParticleEmitter6.Color = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(0.666667, 1, 1))
- ParticleEmitter6.Texture = "http://www.roblox.com/asset/?id=241876428"
- ParticleEmitter6.Transparency = NumberSequence.new(0.84375,0.41874998807907,0.63125002384186,0.44374996423721,0.60000002384186)
- ParticleEmitter6.Size = NumberSequence.new(2,2)
- ParticleEmitter6.Acceleration = Vector3.new(0, -50, 0)
- ParticleEmitter6.Lifetime = NumberRange.new(999, 1000)
- ParticleEmitter6.Rate = 500
- ParticleEmitter6.SpreadAngle = Vector2.new(10, 10)
- ParticleEmitter6.VelocitySpread = 10
- Part7.Name = "c"
- Part7.Parent = Model0
- Part7.Orientation = Vector3.new(1.13999999, 90, 180)
- Part7.Position = Vector3.new(-14.4104042, -126.29158, -153.394669)
- Part7.Rotation = Vector3.new(90.0100021, 88.8600006, 89.9899979)
- Part7.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part7.Transparency = 1
- Part7.Size = Vector3.new(11.5622082, 2.13773704, 15.0378723)
- Part7.Anchored = true
- Part7.BrickColor = BrickColor.new("Black")
- Part7.CanCollide = false
- Part7.Material = Enum.Material.Slate
- Part7.brickColor = BrickColor.new("Black")
- Part7.FormFactor = Enum.FormFactor.Symmetric
- Part7.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter8.Parent = Part7
- ParticleEmitter8.Speed = NumberRange.new(0, 0)
- ParticleEmitter8.Color = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(0.666667, 1, 1))
- ParticleEmitter8.Texture = "http://www.roblox.com/asset/?id=241876428"
- ParticleEmitter8.Transparency = NumberSequence.new(0.84375,0.41874998807907,0.63125002384186,0.44374996423721,0.60000002384186)
- ParticleEmitter8.Size = NumberSequence.new(2,2)
- ParticleEmitter8.Acceleration = Vector3.new(0, -50, 0)
- ParticleEmitter8.Lifetime = NumberRange.new(2000, 2001)
- ParticleEmitter8.Rate = 500
- ParticleEmitter8.SpreadAngle = Vector2.new(10, 10)
- ParticleEmitter8.VelocitySpread = 10
- Part9.Name = "b"
- Part9.Parent = Model0
- Part9.Orientation = Vector3.new(1.13999999, 90, 180)
- Part9.Position = Vector3.new(-25.2454491, -127.160583, -146.391739)
- Part9.Rotation = Vector3.new(90.0100021, 88.8600006, 89.9899979)
- Part9.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part9.Transparency = 1
- Part9.Size = Vector3.new(11.5622082, 2.13773704, 18.7236271)
- Part9.Anchored = true
- Part9.BrickColor = BrickColor.new("Black")
- Part9.CanCollide = false
- Part9.Material = Enum.Material.Slate
- Part9.brickColor = BrickColor.new("Black")
- Part9.FormFactor = Enum.FormFactor.Symmetric
- Part9.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter10.Parent = Part9
- ParticleEmitter10.Speed = NumberRange.new(0, 0)
- ParticleEmitter10.Color = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(0.666667, 1, 1))
- ParticleEmitter10.Texture = "http://www.roblox.com/asset/?id=241876428"
- ParticleEmitter10.Transparency = NumberSequence.new(0.84375,0.41874998807907,0.63125002384186,0.44374996423721,0.60000002384186)
- ParticleEmitter10.Size = NumberSequence.new(2,2)
- ParticleEmitter10.Acceleration = Vector3.new(0, -50, 0)
- ParticleEmitter10.Lifetime = NumberRange.new(999, 1000)
- ParticleEmitter10.Rate = 500
- ParticleEmitter10.SpreadAngle = Vector2.new(10, 10)
- ParticleEmitter10.VelocitySpread = 10
- Part11.Name = "a"
- Part11.Parent = Model0
- Part11.Orientation = Vector3.new(1.13999999, 90, 180)
- Part11.Rotation = Vector3.new(90.0100021, 88.8600006, 89.9899979)
- Part11.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part11.Transparency = 1
- Part11.Size = Vector3.new(10.6776276, 3.16974807, 10.9835443)
- Part11.Anchored = true
- Part11.BrickColor = BrickColor.new("Black")
- Part11.CanCollide = false
- Part11.Material = Enum.Material.Slate
- Part11.brickColor = BrickColor.new("Black")
- Part11.FormFactor = Enum.FormFactor.Symmetric
- Part11.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter12.Parent = Part11
- ParticleEmitter12.Speed = NumberRange.new(0, 0)
- ParticleEmitter12.Color = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(0.666667, 1, 1))
- ParticleEmitter12.Texture = "http://www.roblox.com/asset/?id=241876428"
- ParticleEmitter12.Transparency = NumberSequence.new(0.84375,0.41874998807907,0.63125002384186,0.44374996423721,0.60000002384186)
- ParticleEmitter12.Size = NumberSequence.new(2,2)
- ParticleEmitter12.Acceleration = Vector3.new(0, -50, 0)
- ParticleEmitter12.Lifetime = NumberRange.new(999, 1000)
- ParticleEmitter12.Rate = 500
- ParticleEmitter12.SpreadAngle = Vector2.new(10, 10)
- ParticleEmitter12.VelocitySpread = 10
- ScreenGui = Instance.new("ScreenGui")
- Frame = Instance.new("Frame")
- ScreenGui.Parent = owner.PlayerGui
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.new(0.0313726, 0.0313726, 0.0313726)
- Frame.BackgroundTransparency = 0.69999998807907
- Frame.Size = UDim2.new(0, 9999999, 0, 999999999)
- for i,v in pairs(Model0:GetDescendants()) do
- if v:IsA("Part") then
- v.Size = workspace.Base.Size
- v.CFrame = workspace.Base.CFrame * CFrame.new(math.random(1,200),200,math.random(1,200))
- elseif v:IsA("ParticleEmitter") then
- v.Lifetime = NumberRange.new(999,1000)
- end
- end
- rainsound:Play()
- actualsong:Play()
- coroutine.resume(coroutine.create(function()
- while game:GetService("RunService").Heartbeat:Wait() do
- if game:GetService("Lighting"):FindFirstChild("clouds") == nil and raining == true then
- Sky0 = Instance.new("Sky")
- Sky0.Parent = game:GetService("Lighting")
- Sky0.Name = "clouds"
- Sky0.CelestialBodiesShown = false
- Sky0.SkyboxBk = "rbxassetid://246480323"
- Sky0.SkyboxDn = "rbxassetid://246480523"
- Sky0.SkyboxFt = "rbxassetid://246480105"
- Sky0.SkyboxLf = "rbxassetid://246480549"
- Sky0.SkyboxRt = "rbxassetid://246480565"
- Sky0.SkyboxUp = "rbxassetid://246480504"
- end
- end
- end))
- end)
- tool.Unequipped:Connect(function()
- raining = false
- rainsound:Stop()
- actualsong:Stop()
- game:GetService("Lighting"):FindFirstChild("clouds"):Destroy()
- Model0:Destroy()
- ScreenGui:Destroy()
- morning:Play()
- end)
Advertisement
Add Comment
Please, Sign In to add comment