SHOW:
|
|
- or go back to the newest paste.
| 1 | ||
| 2 | --Converted with ttyyuu12345's model to script plugin v4 | |
| 3 | function sandbox(var,func) | |
| 4 | local env = getfenv(func) | |
| 5 | local newenv = setmetatable({},{
| |
| 6 | __index = function(self,k) | |
| 7 | if k=="script" then | |
| 8 | return var | |
| 9 | else | |
| 10 | return env[k] | |
| 11 | end | |
| 12 | end, | |
| 13 | }) | |
| 14 | setfenv(func,newenv) | |
| 15 | return func | |
| 16 | end | |
| 17 | cors = {}
| |
| 18 | mas = Instance.new("Model",game:GetService("Lighting"))
| |
| 19 | Tool0 = Instance.new("Tool")
| |
| 20 | - | Script1 = Instance.new("Script")
|
| 20 | + | Part1 = Instance.new("Part")
|
| 21 | - | Part2 = Instance.new("Part")
|
| 21 | + | SpecialMesh2 = Instance.new("SpecialMesh")
|
| 22 | - | SpecialMesh3 = Instance.new("SpecialMesh")
|
| 22 | + | LocalScript3 = Instance.new("LocalScript")
|
| 23 | - | ManualWeld4 = Instance.new("ManualWeld")
|
| 23 | + | LocalScript4 = Instance.new("LocalScript")
|
| 24 | - | LocalScript5 = Instance.new("LocalScript")
|
| 24 | + | Animation5 = Instance.new("Animation")
|
| 25 | - | Script6 = Instance.new("Script")
|
| 25 | + | Camera6 = Instance.new("Camera")
|
| 26 | - | Part7 = Instance.new("Part")
|
| 26 | + | Sound7 = Instance.new("Sound")
|
| 27 | - | Script8 = Instance.new("Script")
|
| 27 | + | Tool0.Name = "Mackerel" |
| 28 | - | RotateP9 = Instance.new("RotateP")
|
| 28 | + | |
| 29 | - | Part10 = Instance.new("Part")
|
| 29 | + | Tool0.TextureId = "http://www.roblox.com/asset/?id= 46156602 " |
| 30 | - | CylinderMesh11 = Instance.new("CylinderMesh")
|
| 30 | + | Tool0.Grip = CFrame.new(0, -2, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0) |
| 31 | - | ManualWeld12 = Instance.new("ManualWeld")
|
| 31 | + | Tool0.GripForward = Vector3.new(-1, 0, -0) |
| 32 | - | Part13 = Instance.new("Part")
|
| 32 | + | Tool0.GripPos = Vector3.new(0, -2, 0) |
| 33 | - | ManualWeld14 = Instance.new("ManualWeld")
|
| 33 | + | Tool0.GripRight = Vector3.new(0, 0, -1) |
| 34 | - | ManualWeld15 = Instance.new("ManualWeld")
|
| 34 | + | Part1.Name = "Handle" |
| 35 | - | Part16 = Instance.new("Part")
|
| 35 | + | Part1.Parent = Tool0 |
| 36 | - | Part17 = Instance.new("Part")
|
| 36 | + | Part1.CFrame = CFrame.new(-2.09999847, 0.245092556, 4.36993933, -6.44848842e-06, -0.99999994, -5.96046448e-08, -1, 6.52701419e-06, -0.000248211581, 0.000248180353, 2.98023224e-08, -0.99999994) |
| 37 | - | ManualWeld18 = Instance.new("ManualWeld")
|
| 37 | + | Part1.Orientation = Vector3.new(0.00999999978, -180, -90) |
| 38 | - | Part19 = Instance.new("Part")
|
| 38 | + | Part1.Position = Vector3.new(-2.09999847, 0.245092556, 4.36993933) |
| 39 | - | Part20 = Instance.new("Part")
|
| 39 | + | Part1.Rotation = Vector3.new(179.98999, 0, 90) |
| 40 | - | Part21 = Instance.new("Part")
|
| 40 | + | Part1.Color = Color3.new(0.388235, 0.372549, 0.384314) |
| 41 | - | Part22 = Instance.new("Part")
|
| 41 | + | Part1.Transparency = 1 |
| 42 | - | ManualWeld23 = Instance.new("ManualWeld")
|
| 42 | + | Part1.Size = Vector3.new(0.490000129, 0.200000003, 0.740000129) |
| 43 | - | Part24 = Instance.new("Part")
|
| 43 | + | Part1.BottomSurface = Enum.SurfaceType.Smooth |
| 44 | - | CylinderMesh25 = Instance.new("CylinderMesh")
|
| 44 | + | Part1.BrickColor = BrickColor.new("Dark stone grey")
|
| 45 | - | Part26 = Instance.new("Part")
|
| 45 | + | Part1.Reflectance = 0.40000000596046 |
| 46 | - | Part27 = Instance.new("Part")
|
| 46 | + | Part1.TopSurface = Enum.SurfaceType.Smooth |
| 47 | - | ManualWeld28 = Instance.new("ManualWeld")
|
| 47 | + | Part1.brickColor = BrickColor.new("Dark stone grey")
|
| 48 | - | Part29 = Instance.new("Part")
|
| 48 | + | Part1.FormFactor = Enum.FormFactor.Custom |
| 49 | - | Part30 = Instance.new("Part")
|
| 49 | + | Part1.formFactor = Enum.FormFactor.Custom |
| 50 | - | Part31 = Instance.new("Part")
|
| 50 | + | SpecialMesh2.Parent = Part1 |
| 51 | - | CylinderMesh32 = Instance.new("CylinderMesh")
|
| 51 | + | SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=46140354" |
| 52 | - | Part33 = Instance.new("Part")
|
| 52 | + | SpecialMesh2.Scale = Vector3.new(0.800000012, 0.699999988, 0.699999988) |
| 53 | - | CylinderMesh34 = Instance.new("CylinderMesh")
|
| 53 | + | SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=46140461" |
| 54 | - | Part35 = Instance.new("Part")
|
| 54 | + | SpecialMesh2.MeshType = Enum.MeshType.FileMesh |
| 55 | - | SpecialMesh36 = Instance.new("SpecialMesh")
|
| 55 | + | LocalScript3.Name = "Mackerel" |
| 56 | - | Part37 = Instance.new("Part")
|
| 56 | + | LocalScript3.Parent = Tool0 |
| 57 | - | CylinderMesh38 = Instance.new("CylinderMesh")
|
| 57 | + | table.insert(cors,sandbox(LocalScript3,function() |
| 58 | - | ManualWeld39 = Instance.new("ManualWeld")
|
| 58 | + | -- Mackerel -- |
| 59 | - | Part40 = Instance.new("Part")
|
| 59 | + | -- Whack Animation, time 0.5 seconds |
| 60 | - | SpecialMesh41 = Instance.new("SpecialMesh")
|
| 60 | + | -- Whack Sound, 0.4 seconds |
| 61 | - | ManualWeld42 = Instance.new("ManualWeld")
|
| 61 | + | |
| 62 | - | Camera43 = Instance.new("Camera")
|
| 62 | + | -- Handle to the game service, in case we need to get the time |
| 63 | - | Tool0.Name = "Powerjack" |
| 63 | + | |
| 64 | ||
| 65 | - | Tool0.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0) |
| 65 | + | -- normal damage, when the Mackerel touches a humanoid object |
| 66 | - | Tool0.GripForward = Vector3.new(-1, -0, -0) |
| 66 | + | |
| 67 | - | Tool0.GripPos = Vector3.new(0, 0, -1.5) |
| 67 | + | |
| 68 | - | Tool0.GripRight = Vector3.new(0, 1, 0) |
| 68 | + | -- Whack damage |
| 69 | - | Tool0.GripUp = Vector3.new(0, 0, 1) |
| 69 | + | local whack_damage = 8 |
| 70 | - | Script1.Name = "SwordScript" |
| 70 | + | |
| 71 | - | Script1.Parent = Tool0 |
| 71 | + | -- Handle to tool |
| 72 | - | table.insert(cors,sandbox(Script1,function() |
| 72 | + | Mackerel = script.Parent.Handle |
| 73 | - | --rbxsig%SvOCRfs4MS09DiFeZ9ryb0KVTZKM2pYFaz18031HaaiHrZnjsJ+iWsDsSxTs3c1kYMSB0HlSbgzhXXww3xOBUhW0xm1/5mi4O0KnHYGSc4eBTonK6ryFiCwTrBSmrG59TVp2eG6uctncdw9z3Eo/RyJSCFHXct6N9imKE9Qsdco=% |
| 73 | + | |
| 74 | - | --rbxassetid%1014475% |
| 74 | + | |
| 75 | - | -------- OMG HAX |
| 75 | + | -- For the Animations |
| 76 | local WhackAnim | |
| 77 | ||
| 78 | ||
| 79 | -- Sounds! | |
| 80 | local MackerelWhack = Tool:FindFirstChild("FishWhack")
| |
| 81 | if MackerelWhack == nil then | |
| 82 | MackerelWhack = Instance.new("Sound")
| |
| 83 | - | local slash_damage = 10 |
| 83 | + | MackerelWhack.Name = "FishWhack" |
| 84 | - | local lunge_damage = 30 |
| 84 | + | MackerelWhack.SoundId = "http://www.roblox.com/asset/?id=46153268" |
| 85 | MackerelWhack.Parent = Tool | |
| 86 | - | sword = script.Parent.Handle |
| 86 | + | MackerelWhack.Volume = 1 |
| 87 | end | |
| 88 | ||
| 89 | - | local Jarate = Tool.Damagevuln |
| 89 | + | -- When a collision is detected between the player and another character |
| 90 | - | local JarateClone = Jarate:Clone() |
| 90 | + | |
| 91 | if hit == nil or hit.Parent == nil then return end | |
| 92 | local opponent = hit.Parent:findFirstChild("Torso")
| |
| 93 | - | local SlashSound = Instance.new("Sound")
|
| 93 | + | local humanoid = hit.Parent:findFirstChild("Humanoid")
|
| 94 | - | SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" |
| 94 | + | |
| 95 | - | SlashSound.Parent = sword |
| 95 | + | |
| 96 | - | SlashSound.Volume = .7 |
| 96 | + | local myTorso = vCharacter:findFirstChild("Torso")
|
| 97 | local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
| |
| 98 | - | local LungeSound = Instance.new("Sound")
|
| 98 | + | if humanoid~=nil and humanoid ~= hum and hum ~= nil then |
| 99 | - | LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" |
| 99 | + | -- final check, make sure Mackerel is in-hand |
| 100 | - | LungeSound.Parent = sword |
| 100 | + | |
| 101 | - | LungeSound.Volume = .6 |
| 101 | + | |
| 102 | local joint = right_arm:FindFirstChild("RightGrip")
| |
| 103 | - | local UnsheathSound = Instance.new("Sound")
|
| 103 | + | if (joint ~= nil and (joint.Part0 == Mackerel or joint.Part1 == Mackerel)) then |
| 104 | - | UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" |
| 104 | + | |
| 105 | - | UnsheathSound.Parent = sword |
| 105 | + | humanoid:TakeDamage(damage) |
| 106 | - | UnsheathSound.Volume = 1 |
| 106 | + | -- Add body velocity to the opponent to push him when he gets whacked |
| 107 | local bodyVelocity = Instance.new("BodyVelocity")
| |
| 108 | bodyVelocity.P = 100000 | |
| 109 | bodyVelocity.maxForce = Vector3.new(bodyVelocity.P, bodyVelocity.P, bodyVelocity.P) | |
| 110 | - | if (hit.Parent == nil) then return end -- happens when bullet hits sword |
| 110 | + | bodyVelocity.velocity = (opponent.Position - myTorso.Position) * 6 |
| 111 | bodyVelocity.Parent = opponent | |
| 112 | - | local humanoid = hit.Parent:findFirstChild("Humanoid")
|
| 112 | + | wait(0.5) |
| 113 | if bodyVelocity ~= nil then bodyVelocity:remove() end | |
| 114 | wait(0.5) | |
| 115 | untagHumanoid(humanoid) | |
| 116 | - | if humanoid~=nil and humanoid ~= hum and hum ~= nil then |
| 116 | + | |
| 117 | - | -- final check, make sure sword is in-hand |
| 117 | + | |
| 118 | ||
| 119 | end | |
| 120 | end | |
| 121 | ||
| 122 | - | if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then |
| 122 | + | -- Tagging and Untagging primarily for the leaderboards |
| 123 | function tagHumanoid(humanoid, player) | |
| 124 | - | humanoid:TakeDamage(damage) |
| 124 | + | |
| 125 | - | wait(1) |
| 125 | + | |
| 126 | creator_tag.Name = "creator" | |
| 127 | - | if (humanoid.Health <= 0) then |
| 127 | + | |
| 128 | - | hum:TakeDamage(75) |
| 128 | + | |
| 129 | - | end |
| 129 | + | |
| 130 | function untagHumanoid(humanoid) | |
| 131 | if humanoid ~= nil then | |
| 132 | local tag = humanoid:findFirstChild("creator")
| |
| 133 | if tag ~= nil then | |
| 134 | tag.Parent = nil | |
| 135 | end | |
| 136 | end | |
| 137 | end | |
| 138 | ||
| 139 | ||
| 140 | -- On, left click! | |
| 141 | function attack() | |
| 142 | damage = whack_damage | |
| 143 | -- Play the sound | |
| 144 | if MackerelWhack then MackerelWhack:Play() end | |
| 145 | end | |
| 146 | ||
| 147 | -- Tentative lock | |
| 148 | Tool.Enabled = true | |
| 149 | ||
| 150 | function onActivated() | |
| 151 | if not Tool.Enabled then | |
| 152 | return | |
| 153 | end | |
| 154 | Tool.Enabled = false | |
| 155 | -- Check if the handle to the Player is still available in the space | |
| 156 | - | damage = slash_damage |
| 156 | + | local MyPlayer = Tool.Parent |
| 157 | - | SlashSound:play() |
| 157 | + | if MyPlayer == nil then |
| 158 | - | local anim = Instance.new("StringValue")
|
| 158 | + | |
| 159 | - | anim.Name = "toolanim" |
| 159 | + | end |
| 160 | - | anim.Value = "Slash" |
| 160 | + | -- Check to see if the humanoid is still in the world |
| 161 | - | anim.Parent = Tool |
| 161 | + | local MyHumanoid= MyPlayer:FindFirstChild("Humanoid")
|
| 162 | if MyHumanoid == nil then | |
| 163 | return | |
| 164 | - | function lunge() |
| 164 | + | end |
| 165 | - | damage = lunge_damage |
| 165 | + | attack() |
| 166 | -- Load and play the animation | |
| 167 | - | LungeSound:play() |
| 167 | + | WhackAnim = MyHumanoid:LoadAnimation(Tool.Whack) |
| 168 | if WhackAnim then WhackAnim:Play() end | |
| 169 | - | local anim = Instance.new("StringValue")
|
| 169 | + | -- To rotate the fish as the character swings |
| 170 | - | anim.Name = "toolanim" |
| 170 | + | Tool.GripForward = Vector3.new(-0.7071, 0.7071, 0.0) |
| 171 | - | anim.Value = "Lunge" |
| 171 | + | Tool.GripRight = Vector3.new(0.5774, 0.5774, -0.5774) |
| 172 | - | anim.Parent = Tool |
| 172 | + | Tool.GripUp = Vector3.new(0.4082, 0.4082, 0.8165) |
| 173 | wait(0.5) | |
| 174 | -- Reset the fish to its original orientation | |
| 175 | - | force = Instance.new("BodyVelocity")
|
| 175 | + | Tool.GripForward = Vector3.new(-1.0, 0.0, 0.0) |
| 176 | - | force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 |
| 176 | + | Tool.GripRight = Vector3.new(0.0, 0.0, -1.0) |
| 177 | - | force.Parent = Tool.Parent.Torso |
| 177 | + | Tool.GripUp = Vector3.new(0.0, 1.0, 0.0) |
| 178 | - | wait(.25) |
| 178 | + | |
| 179 | - | swordOut() |
| 179 | + | -- Reset the damage |
| 180 | - | wait(.25) |
| 180 | + | damage = 5 |
| 181 | - | force.Parent = nil |
| 181 | + | |
| 182 | - | wait(.5) |
| 182 | + | |
| 183 | - | swordUp() |
| 183 | + | |
| 184 | function onEquipped() | |
| 185 | - | damage = slash_damage |
| 185 | + | -- Remove the sound if its still playing |
| 186 | MackerelWhack.Volume = 1 | |
| 187 | if MackerelWhack then MackerelWhack:Stop() end | |
| 188 | - | function swordUp() |
| 188 | + | |
| 189 | - | Tool.GripForward = Vector3.new(-1,0,0) |
| 189 | + | |
| 190 | - | Tool.GripRight = Vector3.new(0,1,0) |
| 190 | + | function onUnequipped() |
| 191 | - | Tool.GripUp = Vector3.new(0,0,1) |
| 191 | + | -- Remove the sounds and the animations |
| 192 | MackerelWhack.Volume = 0 | |
| 193 | if WhackAnim then WhackAnim:Stop() end | |
| 194 | - | function swordOut() |
| 194 | + | if MackerelWhack then MackerelWhack:Stop() end |
| 195 | - | Tool.GripForward = Vector3.new(0,0,1) |
| 195 | + | |
| 196 | - | Tool.GripRight = Vector3.new(0,-1,0) |
| 196 | + | |
| 197 | - | Tool.GripUp = Vector3.new(-1,0,0) |
| 197 | + | Tool.Activated:connect(onActivated) |
| 198 | Tool.Equipped:connect(onEquipped) | |
| 199 | Tool.Unequipped:connect(onUnequipped) | |
| 200 | - | function swordAcross() |
| 200 | + | |
| 201 | - | -- parry |
| 201 | + | connection = Mackerel.Touched:connect(blow) |
| 202 | ||
| 203 | ||
| 204 | ||
| 205 | end)) | |
| 206 | - | local last_attack = 0 |
| 206 | + | LocalScript4.Name = "Local Gui" |
| 207 | LocalScript4.Parent = Tool0 | |
| 208 | table.insert(cors,sandbox(LocalScript4,function() | |
| 209 | local Tool = script.Parent; | |
| 210 | ||
| 211 | local stillEquipped = true | |
| 212 | function onEquippedLocal(mouse) | |
| 213 | stillEquipped = true | |
| 214 | if mouse == nil then | |
| 215 | - | local character = Tool.Parent; |
| 215 | + | print("Mouse not found")
|
| 216 | - | local humanoid = character.Humanoid |
| 216 | + | |
| 217 | - | if humanoid == nil then |
| 217 | + | |
| 218 | - | print("Humanoid not found")
|
| 218 | + | |
| 219 | while stillEquipped do | |
| 220 | print("Setting Mouse to Go")
| |
| 221 | mouse.Icon = "rbxasset://textures\\GunCursor.png" | |
| 222 | - | t = r.Stepped:wait() |
| 222 | + | |
| 223 | while Tool.Enabled and stillEquipped do | |
| 224 | - | if (t - last_attack < .2) then |
| 224 | + | wait(.01) |
| 225 | - | lunge() |
| 225 | + | |
| 226 | - | else |
| 226 | + | |
| 227 | - | attack() |
| 227 | + | print("Setting Mouse To Wait")
|
| 228 | mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" | |
| 229 | ||
| 230 | - | last_attack = t |
| 230 | + | while not Tool.Enabled and stillEquipped do |
| 231 | wait(.01) | |
| 232 | - | --wait(.5) |
| 232 | + | |
| 233 | end | |
| 234 | end | |
| 235 | ||
| 236 | function onUnequippedLocal() | |
| 237 | stillEquipped = false | |
| 238 | - | function onEquipped() |
| 238 | + | |
| 239 | - | UnsheathSound:play() |
| 239 | + | |
| 240 | - | if Tool.Parent.Head ~= nil then |
| 240 | + | |
| 241 | - | JarateClone.Parent = Tool.Parent.Humanoid |
| 241 | + | Tool.Equipped:connect(onEquippedLocal) |
| 242 | - | JarateClone.Disabled = false |
| 242 | + | Tool.Unequipped:connect(onUnequippedLocal) |
| 243 | ||
| 244 | end)) | |
| 245 | Animation5.Name = "Whack" | |
| 246 | Animation5.Parent = Tool0 | |
| 247 | - | script.Parent.Activated:connect(onActivated) |
| 247 | + | Animation5.AnimationId = "http://www.roblox.com/Asset?ID=46151856" |
| 248 | - | script.Parent.Equipped:connect(onEquipped) |
| 248 | + | Camera6.Name = "ThumbnailCamera" |
| 249 | Camera6.Parent = Tool0 | |
| 250 | Camera6.CFrame = CFrame.new(-0.941516638, 5.70548439, 0.0050331275, -0.0218932275, 0.985759676, -0.166728929, -2.32830644e-10, 0.166768894, 0.985996008, 0.99976033, 0.0215866342, -0.00365110952) | |
| 251 | - | connection = sword.Touched:connect(blow) |
| 251 | + | Camera6.CoordinateFrame = CFrame.new(-0.941516638, 5.70548439, 0.0050331275, -0.0218932275, 0.985759676, -0.166728929, -2.32830644e-10, 0.166768894, 0.985996008, 0.99976033, 0.0215866342, -0.00365110952) |
| 252 | Camera6.Focus = CFrame.new(-0.030002594, 0.315002859, 0.0249938965, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 253 | Camera6.focus = CFrame.new(-0.030002594, 0.315002859, 0.0249938965, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 254 | Sound7.Name = "FishWhack" | |
| 255 | Sound7.Parent = Tool0 | |
| 256 | - | Part2.Name = "Handle" |
| 256 | + | Sound7.SoundId = "http://www.roblox.com/asset/?id=46153268" |
| 257 | - | Part2.Parent = Tool0 |
| 257 | + | Sound7.Volume = 0 |
| 258 | - | Part2.CFrame = CFrame.new(-4.42699814, 2.24855804, -3.26099801, -0.931543052, 0.278013945, -0.234380454, -0.224591956, 0.0670283288, 0.972143292, 0.285979867, 0.95823431, -1.65005218e-07) |
| 258 | + | |
| 259 | - | Part2.Orientation = Vector3.new(-76.4399948, -90, -73.3799973) |
| 259 | + | |
| 260 | - | Part2.Position = Vector3.new(-4.42699814, 2.24855804, -3.26099801) |
| 260 | + | |
| 261 | - | Part2.Rotation = Vector3.new(-90, -13.5599995, -163.37999) |
| 261 | + | |
| 262 | - | Part2.Color = Color3.new(0.388235, 0.372549, 0.384314) |
| 262 | + | |
| 263 | - | Part2.Transparency = 1 |
| 263 | + | |
| 264 | - | Part2.Size = Vector3.new(1, 0.800000012, 4) |
| 264 | + | |
| 265 | - | Part2.BottomSurface = Enum.SurfaceType.Smooth |
| 265 | + | |
| 266 | - | Part2.BrickColor = BrickColor.new("Dark stone grey")
|
| 266 | + | |
| 267 | - | Part2.Reflectance = 0.40000000596046 |
| 267 | + |