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 = {}
- 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")
- RemoteEvent8 = Instance.new("RemoteEvent")
- Script9 = Instance.new("Script")
- Sound10 = Instance.new("Sound")
- Script11 = Instance.new("Script")
- Animation12 = Instance.new("Animation")
- Animation13 = Instance.new("Animation")
- Animation14 = Instance.new("Animation")
- Tool0.Name = "HOMERUNBITCH!"
- Tool0.Parent = mas
- 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)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.Reflectance = 0.40000000596046
- Part1.Rotation = Vector3.new(-90, 0, 90)
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.Size = Vector3.new(1, 0.800000012, 5.52000189)
- Part1.CFrame = CFrame.new(-4.39999914, 2.76000214, 8.49999809, 1.45286322e-07, -0.999999881, 2.77318378e-07, 3.85828599e-07, 2.98453244e-08, 1.00000048, -1.0000006, -4.84287597e-08, -7.44502131e-07)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Position = Vector3.new(-4.39999914, 2.76000214, 8.49999809)
- Part1.Orientation = Vector3.new(-90, 90, 0)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "rbxassetid://54983181"
- SpecialMesh2.Scale = Vector3.new(3, 3, 2)
- SpecialMesh2.TextureId = "rbxassetid://183854972"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(3, 3, 2)
- Sound3.Name = "Hit"
- Sound3.Parent = Part1
- Sound3.SoundId = "rbxassetid://386946017"
- Sound4.Name = "Swing"
- Sound4.Parent = Part1
- Sound4.SoundId = "rbxassetid://101164100"
- Sound5.Name = "Swingy"
- Sound5.Parent = Part1
- Sound5.SoundId = "rbxassetid://1306070008"
- Sound6.Name = "Strike"
- Sound6.Parent = Part1
- Sound6.SoundId = "rbxassetid://491296320"
- Sound6.Volume = 1
- LocalScript7.Name = "Client"
- LocalScript7.Parent = Tool0
- table.insert(cors,sandbox(LocalScript7,function()
- local Player = game:GetService("Players").LocalPlayer
- local UIS = game:GetService("UserInputService")
- local Mouse = Player:GetMouse()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Tracks = {}
- local InputType = Enum.UserInputType
- function playAnimation(animName, ...)
- if Tracks[animName] then
- Tracks[animName]:Play()
- else
- local anim = Tool:FindFirstChild(animName)
- if anim and Tool.Parent and Tool.Parent:FindFirstChild("Humanoid") then
- Tracks[animName] = Tool.Parent.Humanoid:LoadAnimation(anim)
- playAnimation(animName, ...)
- end
- end
- end
- function stopAnimation(animName)
- if Tracks[animName] then
- Tracks[animName]:Stop()
- end
- end
- function inputBegan(input)
- if input.UserInputType == InputType.MouseButton1 then
- Remote:FireServer("NormalStart")
- end
- end
- function inputEnded(input)
- if input.UserInputType == InputType.MouseButton1 then
- Remote:FireServer("NormalStop")
- end
- end
- function onRemote(func, ...)
- if func == "PlayAnimation" then
- playAnimation(...)
- elseif func == "StopAnimation" then
- stopAnimation(...)
- end
- end
- UIS.InputBegan:connect(inputBegan)
- UIS.InputEnded:connect(inputEnded)
- Remote.OnClientEvent:connect(onRemote)
- end))
- RemoteEvent8.Name = "Remote"
- RemoteEvent8.Parent = Tool0
- Script9.Parent = Tool0
- table.insert(cors,sandbox(Script9,function()
- EquipSound = script.Parent.EquipSound
- Tool = script.Parent
- Tool.Equipped:connect(function()
- local Equip = script.Parent.Parent.Humanoid:LoadAnimation(script.Parent.Equip)
- Equip:Play()
- EquipSound:Play()
- end)
- Tool.Unequipped:connect(function()
- local Equip = script.Parent.Parent.Parent.Character.Humanoid:LoadAnimation(script.Parent.Equip)
- Equip:Stop()
- end)
- end))
- Sound10.Name = "EquipSound"
- Sound10.Parent = Tool0
- Sound10.SoundId = "rbxassetid://169799883"
- Script11.Name = "Server"
- Script11.Parent = Tool0
- table.insert(cors,sandbox(Script11,function()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Handle = Tool:WaitForChild("Handle")
- local Mesh = Handle:WaitForChild("Mesh")
- local Equipping = false
- local Grip = nil
- local AttackAble = true
- local AttackRestTime = 0.5
- local AttackVictims = {}
- local AttackDamage = 99.99
- local AttackWindow = 0.66
- local AttackDamaging = false
- local AttackWindup = 0.1
- function getPlayer()
- local char = Tool.Parent
- return game:GetService("Players"):GetPlayerFromCharacter(char)
- end
- function contains(t, v)
- for _, val in pairs(t) do
- if val == v then
- return true
- end
- end
- return false
- end
- function tagHuman(human)
- local tag = Instance.new("ObjectValue")
- tag.Value = getPlayer()
- tag.Name = "creator"
- tag.Parent = human
- game:GetService("Debris"):AddItem(tag)
- end
- function convertGrip()
- if Tool.Parent and Tool.Parent:FindFirstChild("Right Arm") then
- local weld = Tool.Parent["Right Arm"]:FindFirstChild("RightGrip")
- if weld then
- Grip = Instance.new("Motor6D")
- Grip.Name = "RightGrip"
- Grip.Part0 = weld.Part0
- Grip.Part1 = weld.Part1
- Grip.C0 = weld.C0
- Grip.C1 = weld.C1
- Grip.Parent = weld.Parent
- weld:Destroy()
- end
- end
- end
- function normal()
- if not AttackAble then return end
- --rest
- AttackAble = false
- delay(AttackRestTime, function()
- AttackAble = true
- end)
- --damage
- delay(AttackWindup, function()
- AttackVictims = {}
- AttackDamaging = true
- delay(AttackWindow, function()
- AttackDamaging = false
- end)
- end)
- --sound
- Handle.Swing:Play()
- --animation
- delay(0.66, function()
- end)
- Remote:FireClient(getPlayer(), "PlayAnimation", "Swing1")
- end
- function shove(char)
- local wielder = Tool.Parent
- if wielder and wielder:FindFirstChild("HumanoidRootPart") and char and char:FindFirstChild("HumanoidRootPart") then
- local shover = wielder.HumanoidRootPart
- local shovee = char.HumanoidRootPart
- local distance = 200
- local duration = 1
- local speed = distance/duration
- local velocity = (shovee.Position - shover.Position).unit * speed
- Handle.Hit.Volume = 1
- Handle.Hit:Play()
- Handle.Strike.Volume = 1
- Handle.Strike:Play()
- local shoveForce = Instance.new("BodyVelocity")
- shoveForce.maxForce = Vector3.new(1e9, 1e9, 1e9)
- shoveForce.velocity = velocity
- shoveForce.Parent = shovee
- game:GetService("Debris"):AddItem(shoveForce, duration)
- local humanoid = char:FindFirstChild("Humanoid")
- humanoid.Sit = true
- wait(1)
- humanoid.Jump = true
- end
- end
- function onHandleTouched(part)
- if not AttackDamaging then return end
- if part:IsDescendantOf(Tool.Parent) then return end
- if part.Parent and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackVictims, human) then
- table.insert(AttackVictims, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- shove(part.Parent)
- end
- end
- end
- function onEquip()
- if Equipping then return end
- Equipping = true
- convertGrip()
- --animation
- Equipping = false
- end
- function onUnequip()
- if Grip then
- Grip:Destroy()
- end
- --animation
- end
- function onRemote(player, func, ...)
- if player ~= getPlayer() then return end
- if func == "NormalStart" then
- normal()
- end
- end
- Tool.Equipped:connect(onEquip)
- Tool.Unequipped:connect(onUnequip)
- Remote.OnServerEvent:connect(onRemote)
- Handle.Touched:connect(onHandleTouched)
- end))
- Animation12.Name = "Equip"
- Animation12.Parent = Tool0
- Animation12.AnimationId = "http://www.roblox.com/Asset?ID=94160581"
- Animation13.Name = "Idle"
- Animation13.Parent = Tool0
- Animation13.AnimationId = "http://www.roblox.com/Asset?ID=94108418"
- Animation14.Name = "Swing1"
- Animation14.Parent = Tool0
- Animation14.AnimationId = "http://www.roblox.com/Asset?ID=94160738"
- 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