Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- print('Have your own minecraft pickaxe '.. game.Players.LocalPlayer.timetodie23232223)
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- LocalScript7 = Instance.new("LocalScript")
- Part8 = Instance.new("Part")
- ManualWeld9 = Instance.new("ManualWeld")
- Part10 = Instance.new("Part")
- LocalScript11 = Instance.new("LocalScript")
- ManualWeld12 = Instance.new("ManualWeld")
- Tool0.Name = "Pickaxe"
- Tool0.Parent = mas
- Tool0.TextureId = "rbxassetid://704114646"
- Tool0.GripForward = Vector3.new(-1, -0, -0)
- Tool0.GripPos = Vector3.new(0, 0, -1.5)
- Tool0.GripRight = Vector3.new(0, 1, 0)
- Tool0.GripUp = Vector3.new(0, 0, 1)
- Tool0.ToolTip = "Beware of bugs : Bugs : [May break and affect on touch not on mouse then touch] Also not the best pickaxe"
- Part1.Name = "Pick"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.Rotation = Vector3.new(-89.0400009, 0, 90)
- Part1.CanCollide = false
- Part1.Locked = true
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.Size = Vector3.new(1, 0.800000012, 4)
- Part1.CFrame = CFrame.new(-234.804764, 538.928284, -13.7873125, 5.58793545e-09, -1.00000048, 1.57160684e-09, 0.0167616773, -1.10594556e-09, 0.999860048, -0.999859869, 1.86264515e-09, 0.0167622771)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Position = Vector3.new(-234.804764, 538.928284, -13.7873125)
- Part1.Orientation = Vector3.new(-89.0400009, 0, 90)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=22147051"
- SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
- SpecialMesh2.TextureId = "rbxassetid://704114950"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
- Sound3.Name = "Fire"
- Sound3.Parent = Part1
- Sound3.SoundId = "rbxassetid://636316879"
- Sound3.Volume = 1
- Sound4.Name = "Hit"
- Sound4.Parent = Part1
- Sound4.SoundId = "http://www.roblox.com/Asset?ID=123252378"
- Sound4.Volume = 1
- Sound5.Name = "Reload"
- Sound5.Parent = Part1
- Sound5.SoundId = "rbxassetid://145081845"
- Sound5.Volume = 1
- Sound6.Name = "Swing"
- Sound6.Parent = Part1
- Sound6.SoundId = "http://www.roblox.com/Asset?ID=119888724"
- Sound6.Volume = 1
- LocalScript7.Name = "MacheteScript"
- LocalScript7.Parent = Part1
- local stats = Instance.new("IntValue")
- stats.Name = "leaderstats"
- stats.Parent = Player
- local money = Instance.new("StringValue")
- money.Name = "Cubic Coins" -- Change "Money" to anything you want to name it like "Cash"
- money.Value = 30 -- Change the value to how many you want when the player joins the game
- money.Parent = stats
- local money2 = Instance.new("IntValue")
- money2.Name = "Destroyed Blocks" -- Change "Money" to anything you want to name it like "Cash"
- money2.Value = 0 -- Change the value to how many you want when the player joins the game
- money2.Parent = stats
- local money3 = Instance.new("StringValue")
- money3.Name = "Time Spent" -- Change "Money" to anything you want to name it like "Cash"
- money3.Value = 0 -- Change the value to how many you want when the player joins the game
- money3.Parent = stats
- while true do
- wait()
- money3.Value = money3.Value + 1
- end
- table.insert(cors,sandbox(LocalScript7,function()
- ------------------------
- --[[UTIL Functions]]--
- ------------------------
- --Global functions used by all classes are wrapped in UTIL
- --deal with it.
- local UTIL = {}
- function UTIL.Class(tableIn,template)
- tableIn = tableIn or {}
- local mt = {
- __metatable = UTIL.DeepCopy(template);
- __index = UTIL.DeepCopy(template);
- }
- return setmetatable(tableIn, mt)
- end
- function UTIL.MakeClass(...)
- local arg = {...}
- assert(#arg>0, 'ERROR: class needs 1 argument or more')
- local members = arg[1]
- for i=2,#arg,1 do
- if type(arg[i])=='table' then
- for key,val in pairs(arg[i]) do
- if not members[key] then
- members[key] = val
- end
- end
- end
- end
- local function New(init)
- return UTIL.Class(init or {},members)
- end
- local function Copy(obj, ...)
- local newobj = obj:New(unpack(arg))
- for n,v in pairs(obj) do newobj[n] = v end
- return newobj
- end
- members.New = New
- members.Copy = Copy
- return mt
- end
- function UTIL.DeepCopy(orig)
- local orig_type = type(orig)
- local copy
- if orig_type == 'table' then
- copy = {}
- for orig_key, orig_value in next, orig, nil do
- copy[UTIL.DeepCopy(orig_key)] = UTIL.DeepCopy(orig_value)
- end
- setmetatable(copy, UTIL.DeepCopy(getmetatable(orig)))
- else -- number, string, boolean, etc
- copy = orig
- end
- return copy
- end
- function UTIL.Instantiate(guiType)
- return function(data)
- local obj = Instance.new(guiType)
- for k, v in pairs(data) do
- if type(k) == 'number' then
- v.Parent = obj
- else
- obj[k] = v
- end
- end
- return obj
- end
- end
- function UTIL.RetroRegister(func,...)
- func()
- for _,i in ipairs({...}) do
- i:connect(func)
- end
- end
- -- Waits for a new character to be added if the current one is invalid
- -- (Ensures that you don't have the old dead character after a respawn)
- function UTIL.WaitForValidCharacter(player)
- local character = player.Character
- if not character or not character.Parent or not character:FindFirstChild('Humanoid') or character.Humanoid.Health <= 0 then
- player.CharacterAdded:wait()
- wait(0) --NOTE: Necessary for server scripts executing on the same event
- character = player.Character
- end
- return character
- end
- -- Returns a character ancestor and its Humanoid, or nil
- function UTIL.FindCharacterAncestor(subject)
- if subject and subject ~= Workspace then
- local humanoid = subject:FindFirstChild('Humanoid')
- if humanoid then
- return subject, humanoid
- else
- return UTIL.FindCharacterAncestor(subject.Parent)
- end
- end
- return nil
- end
- UTIL.AssetURL = 'http://www.roblox.com/asset/?id='
- UTIL.TouchEnabled = game:GetService("UserInputService").TouchEnabled
- do
- local suceeded,_ =pcall(function() game.Workspace.CurrentCamera:GetPanSpeed() end)
- UTIL.CanCheckPanSpeed = suceeded
- end
- local DebrisService = Game:GetService('Debris')
- local DebugPrintOffset = 0
- function UTIL.Dprint(...)
- local line = ''
- for _, segment in pairs({...}) do
- line = line .. (line and ' ' or '') .. tostring(segment)
- end
- local gui = Instance.new('ScreenGui')
- local label = Instance.new('TextLabel')
- label.Text = line
- label.Size = UDim2.new(0.25, 0, 0.05, 0)
- label.BackgroundTransparency = 0.5
- label.Position = UDim2.new(0, 0, 0, DebugPrintOffset)
- label.TextWrapped = true
- label.Parent = gui
- DebrisService:AddItem(gui, 30)
- gui.Parent = script.Parent
- DebugPrintOffset = (DebugPrintOffset <= 600) and DebugPrintOffset + 30 or 0
- end
- --
- --All Welding Related Utility functions should be put here
- --
- WeldUtil = {}
- do
- function WeldUtil.WeldBetween(a, b)
- local weld = Instance.new("Weld")
- weld.Part0 = a
- weld.Part1 = b
- weld.C0 = CFrame.new()
- weld.C1 = b.CFrame:inverse() * a.CFrame
- weld.Parent = a
- return weld
- end
- function WeldUtil:PermaWeld(weld)
- local OriginalParent = weld.Parent
- weld.Changed:connect(function()
- Delay(0,function() weld.Parent = OriginalParent end)
- end)
- end
- end
- local InternalEvent =
- {
- Listeners = nil,
- }
- do
- UTIL.MakeClass(InternalEvent)
- function InternalEvent:Connect(func)
- if not self.Listeners then self.Listeners = {} end
- table.insert(self.Listeners,func)
- end
- function InternalEvent:Fire(...)
- if not self.Listeners then return end
- local args = {...}
- for _,i in ipairs(self.Listeners) do
- Spawn(function() i(unpack(args)) end)
- end
- end
- end
- --[[Sword Part Class]]--
- local SwordPart =
- {
- Damage = 5,
- AttackTime = 0.5,
- CoolDown = 0,
- LastSwing = 0,
- LastHit = 0,
- Part= nil,
- Owner = nil,--player object that owns this sword
- OnHit = nil,
- OnHitHumanoid = nil,
- OnAttackReady = nil,
- OnAttack = nil,
- SwingSound = nil,
- HitSound = nil,
- SwingAnimation = nil, --animation track!
- ActiveConnections = {},
- }
- do
- UTIL.MakeClass(SwordPart)
- function SwordPart.New(npart,nowner)
- local init= UTIL.DeepCopy(SwordPart)
- init.Part= npart
- init.Owner = nowner
- table.insert(init.ActiveConnections,init.Part.Touched:connect(function(hit) init:SwordTouch(hit) end))
- init.OnHit = InternalEvent.New()
- init.OnHitHumanoid = InternalEvent.New()
- init.OnAttackReady = InternalEvent.New()
- init.OnAttack = InternalEvent.New()
- return init
- end
- function SwordPart:SwordTouch(hit)
- if tick()-self.LastSwing >self.AttackTime or tick()-self.LastHit<self.AttackTime then return end
- self.OnHit:Fire(hit)
- local character,humanoid = UTIL.FindCharacterAncestor(hit)
- if character and character ~= self.Owner.Character then
- humanoid:TakeDamage(self.Damage)
- self.OnHitHumanoid:Fire(humanoid,hit)
- self.LastHit = tick()
- if self.HitSound then
- self.HitSound:Play()
- end
- end
- end
- function SwordPart:DoSwing()
- if tick()-self.LastSwing<self.AttackTime+self.CoolDown then
- return
- end
- if self.SwingAnimation then
- self.SwingAnimation:Play()
- end
- if self.SwingSound then
- self.SwingSound:Play()
- end
- self.LastSwing = tick()
- self.OnAttack:Fire()
- end
- function SwordPart:Destroy()
- for _,i in pairs(self.ActiveConnections) do
- i:disconnect()
- end
- end
- end
- do
- local Handle = script.Parent
- local Tool = Handle.Parent
- local Player = game.Players.LocalPlayer
- local Character = UTIL.WaitForValidCharacter(Player)
- local SwingAni = UTIL.Instantiate"Animation"
- {AnimationId = "http://www.roblox.com/Asset?ID=89289879"}
- local HitSound = Handle:WaitForChild('Hit')
- local SwingSound = Handle:WaitForChild('Swing')
- local SwingAniTrack
- local Sword
- Tool.Equipped:connect(function(mouse)
- Sword = SwordPart.New(Handle,Player)
- Sword.Damage = 500
- Sword.HitSound = HitSound
- Sword.SwingSound = SwingSound
- Character = UTIL.WaitForValidCharacter(Player)
- local Humanoid = Character:FindFirstChild('Humanoid')
- SwingAniTrack = Humanoid:LoadAnimation(SwingAni)
- Sword.SwingAnimation = SwingAniTrack
- Sword.OnHitHumanoid:Connect(function(humanoid,hit)
- local myTorso = Character:FindFirstChild('Torso')
- local torso = humanoid.Parent:FindFirstChild('Torso')
- local Hits = 0
- if not torso or not myTorso then return end
- if hit.Name == "" then
- end
- mouse.Button1Up:connect(function()
- Hits = 0
- end)
- end)
- mouse.Button1Down:connect(function()
- Sword:DoSwing()
- end)
- end)
- Tool.Unequipped:connect(function()
- Sword:Destroy()
- end)
- end
- end))
- Part8.Name = "Handle"
- Part8.Parent = Tool0
- Part8.BrickColor = BrickColor.new("Dark stone grey")
- Part8.Transparency = 1
- Part8.Rotation = Vector3.new(-88.2799988, -1.65999997, 92.4899979)
- Part8.CanCollide = false
- Part8.FormFactor = Enum.FormFactor.Plate
- Part8.Size = Vector3.new(1, 0.800000012, 0.500001192)
- Part8.CFrame = CFrame.new(-234.805115, 538.928284, -13.7470827, -0.0434540175, -0.998636246, -0.028957922, 0.0287435874, -0.0302229878, 0.999130487, -0.998642206, 0.0425838232, 0.030018501)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part8.Position = Vector3.new(-234.805115, 538.928284, -13.7470827)
- Part8.Orientation = Vector3.new(-87.6100006, -43.9699974, 136.440002)
- Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
- ManualWeld9.Name = "Weld"
- ManualWeld9.Parent = Part8
- ManualWeld9.C0 = CFrame.new(0, 0, 0, -0.0434539989, 0.0287438929, -0.998641908, -0.998635769, -0.0302229859, 0.0425838158, -0.0289579108, 0.999129951, 0.0300182104)
- ManualWeld9.C1 = CFrame.new(-0.0402240753, 0.000350952148, 0.000671386719, 0, 0.0167619921, -0.999859512, -1, 0, 0, 0, 0.999859512, 0.0167619921)
- ManualWeld9.Part0 = Part8
- ManualWeld9.Part1 = Part1
- Part10.Name = "HitBox"
- Part10.Parent = Tool0
- Part10.BrickColor = BrickColor.new("Dark stone grey")
- Part10.Transparency = 1
- Part10.Rotation = Vector3.new(178.779999, -1.07999992, 90.1199951)
- Part10.CanCollide = false
- Part10.FormFactor = Enum.FormFactor.Plate
- Part10.Size = Vector3.new(1.32999969, 0.800000012, 5.77000427)
- Part10.CFrame = CFrame.new(-234.800262, 540.384399, -13.9235306, -0.0021009997, -0.999819875, -0.0188658666, -0.999771893, 0.00250116596, -0.0212126337, 0.0212559979, 0.0188169945, -0.999597013)
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part10.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part10.Position = Vector3.new(-234.800262, 540.384399, -13.9235306)
- Part10.Orientation = Vector3.new(1.22000003, -178.919998, -89.8600006)
- Part10.Color = Color3.new(0.388235, 0.372549, 0.384314)
- LocalScript11.Parent = Part10
- table.insert(cors,sandbox(LocalScript11,function()
- Player = game.Players.LocalPlayer
- local stats1 = Player.leaderstats["Destroyed Blocks"]
- local stats2 = Player.leaderstats["Cubic Coins"]
- Hitted = true
- ButtonClick = true
- script.Parent.Parent.Equipped:Connect(function(mouse)
- mouse.Button1Down:connect(function(key)
- if ButtonClick == true then
- ButtonClick = false
- script.Parent.Touched:Connect(function(hit)
- local Hits = 0
- if Hitted == true then
- Hitted = false
- if hit.Name == "Part" or "Union" or "MeshPart" then
- Hits = Hits + 1 * 1.43
- stats2.Value = stats2.Value + Hits
- sizex = 0
- sizex = sizex * hit.Size.X
- hit.Size = hit.Size - Vector3.new(Hits,Hits,Hits)
- wait(0.002)
- Hitted = true
- mouse.Button1Up:Connect(function()
- ButtonClick = true
- end)
- if Hits > hit.Size.X then
- stats1.Value = stats1.Value + 1
- stats2.Value = stats2.Value + sizex * Hits
- wait(0.3)
- hit:Destroy()
- end
- end
- end
- end)
- end
- end)
- end)
- end))
- ManualWeld12.Name = "Weld"
- ManualWeld12.Parent = Part10
- ManualWeld12.C0 = CFrame.new(0, 0, 0, -0.0021009997, -0.999771893, 0.0212559979, -0.999819875, 0.00250116596, 0.0188169945, -0.0188658666, -0.0212126337, -0.999597013)
- ManualWeld12.C1 = CFrame.new(0.160606384, -0.00450134277, 1.45361328, 5.58793545e-09, 0.0167616755, -0.99985975, -1.00000036, -1.51339918e-09, 1.86264515e-09, 1.80443749e-09, 0.999859989, 0.016762279)
- ManualWeld12.Part0 = Part10
- ManualWeld12.Part1 = Part1
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement