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 | - | Sound3 = Instance.new("Sound")
|
| 22 | + | Script3 = Instance.new("Script")
|
| 23 | Sound4 = Instance.new("Sound")
| |
| 24 | - | Sound5 = Instance.new("Sound")
|
| 24 | + | Script5 = Instance.new("Script")
|
| 25 | - | SpecialMesh6 = Instance.new("SpecialMesh")
|
| 25 | + | Tool0.Name = "Gun" |
| 26 | - | Script7 = Instance.new("Script")
|
| 26 | + | |
| 27 | - | Script8 = Instance.new("Script")
|
| 27 | + | Tool0.GripForward = Vector3.new(0.014998313, 0, -0.999887586) |
| 28 | - | Script9 = Instance.new("Script")
|
| 28 | + | Tool0.GripPos = Vector3.new(0, 0, 1) |
| 29 | - | Script10 = Instance.new("Script")
|
| 29 | + | Tool0.GripRight = Vector3.new(0.89165622, 0.452515543, 0.0133748427) |
| 30 | - | ParticleEmitter11 = Instance.new("ParticleEmitter")
|
| 30 | + | Tool0.GripUp = Vector3.new(-0.45246467, 0.891756594, -0.00678696996) |
| 31 | - | Tool0.Name = "Chainsaw" |
| 31 | + | Part1.Name = "Handle" |
| 32 | Part1.Parent = Tool0 | |
| 33 | - | Tool0.TextureId = "rbxassetid://1166197683" |
| 33 | + | Part1.Rotation = Vector3.new(-89.2299957, -0.389999986, -116.759995) |
| 34 | - | Tool0.GripPos = Vector3.new(0, 0, 1.5) |
| 34 | + | Part1.RotVelocity = Vector3.new(1, 1, 1) |
| 35 | - | Script1.Name = "SwordScript" |
| 35 | + | Part1.Size = Vector3.new(1, 1, 5) |
| 36 | - | Script1.Parent = Tool0 |
| 36 | + | Part1.CFrame = CFrame.new(-15.0473862, 6.09787512, -13.2487059, -0.450310409, 0.892846406, -0.00678965962, -0.0150141492, 3.12112206e-05, 0.999887347, 0.892745912, 0.45036158, 0.0133912731) |
| 37 | - | table.insert(cors,sandbox(Script1,function() |
| 37 | + | Part1.Position = Vector3.new(-15.0473862, 6.09787512, -13.2487059) |
| 38 | - | -------- OMG HAX |
| 38 | + | Part1.Orientation = Vector3.new(-89.1399994, -26.8899994, -89.8799973) |
| 39 | - | local game = game |
| 39 | + | SpecialMesh2.Parent = Part1 |
| 40 | SpecialMesh2.MeshId = "rbxassetid://625948113" | |
| 41 | SpecialMesh2.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012) | |
| 42 | SpecialMesh2.TextureId = "rbxassetid://625948238" | |
| 43 | SpecialMesh2.MeshType = Enum.MeshType.FileMesh | |
| 44 | - | local damage = 19 |
| 44 | + | SpecialMesh2.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012) |
| 45 | Script3.Name = "SoundScript" | |
| 46 | - | sword = script.Parent.Handle |
| 46 | + | Script3.Parent = Part1 |
| 47 | - | Tool = script.Parent |
| 47 | + | table.insert(cors,sandbox(Script3,function() |
| 48 | --Made by BLUEHHOOD-- | |
| 49 | - | function slice(hit) |
| 49 | + | |
| 50 | - | if (hit.Parent == nil) then return end -- happens when bullet hits sword |
| 50 | + | |
| 51 | while true do | |
| 52 | wait(0) | |
| 53 | script.Sound:Play(150558724)--Change this to the musicid you want. Also change the sound inside of the script.-- | |
| 54 | wait(70)--Change this to how long you want the music to play-- | |
| 55 | end | |
| 56 | end)) | |
| 57 | Sound4.Parent = Script3 | |
| 58 | - | local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
|
| 58 | + | Sound4.SoundId = "rbxassetid://180955656" |
| 59 | - | if humanoid~=nil and humanoid ~= hum and hum ~= nil then |
| 59 | + | |
| 60 | - | tagHumanoid(humanoid, vPlayer) |
| 60 | + | Script5.Name = "SwordScript" |
| 61 | - | humanoid:TakeDamage(damage) |
| 61 | + | Script5.Parent = Part1 |
| 62 | - | wait(1) |
| 62 | + | table.insert(cors,sandbox(Script5,function() |
| 63 | - | untagHumanoid(humanoid) |
| 63 | + | --Fixed by ImGuestLie |
| 64 | ||
| 65 | antiTK = true | |
| 66 | ||
| 67 | - | function tagHumanoid(humanoid) |
| 67 | + | teamgroups = {
|
| 68 | - | creator_tag = Instance.new("ObjectValue")
|
| 68 | + | |
| 69 | --[[ HOW TO USE TEAMGROUPS: | |
| 70 | Put as many teams as you want in a table inside of teamgroups | |
| 71 | format for a teamcolor is BrickColor.new("TeamColor")
| |
| 72 | type the EXACT teamcolor | |
| 73 | ||
| 74 | When a player is on a team in a teamgroup, and the person (s)he is trying to kill is also in the same teamgroup, | |
| 75 | the user will not get damaged. | |
| 76 | ||
| 77 | Basically this is like anti-TK but across multiple teams. | |
| 78 | --]] | |
| 79 | ||
| 80 | ||
| 81 | ||
| 82 | --Example of a teamgroup: | |
| 83 | --{ BrickColor.new("Bright red"), BrickColor.new("Bright blue") }
| |
| 84 | - | firing = false |
| 84 | + | |
| 85 | ||
| 86 | } | |
| 87 | ||
| 88 | --END OF CONFIGURABLE OPTIONS-- | |
| 89 | ||
| 90 | r = game:service("RunService")
| |
| 91 | - | character = Tool.Parent; |
| 91 | + | |
| 92 | function candamage(myteam,theirteam) | |
| 93 | if antiTK == true and myteam == theirteam then return false end | |
| 94 | for i,v in pairs(teamgroups) do | |
| 95 | local ismyteam = false | |
| 96 | local istheirteam = false | |
| 97 | for _,v in pairs(teamgroups[i]) do | |
| 98 | if v == myteam then ismyteam = true end | |
| 99 | - | player = game.Players:findFirstChild(character.Name) |
| 99 | + | if v == theirteam then istheirteam = true end |
| 100 | end | |
| 101 | - | if Tool.Handle:findFirstChild("Startup") ~= nil then
|
| 101 | + | if ismyteam == true and istheirteam == true then |
| 102 | - | Tool.Handle.Startup:play() |
| 102 | + | return false |
| 103 | end | |
| 104 | end | |
| 105 | return true | |
| 106 | - | firing = true |
| 106 | + | |
| 107 | - | connection = script.Parent.Handle.Touched:connect(blow) |
| 107 | + | |
| 108 | - | Tool.Handle.attack:play() |
| 108 | + | local acceptableparts = {
|
| 109 | - | Tool.Handle.idle:stop() |
| 109 | + | "Head"; "Left Arm"; "Left Leg"; "Right Arm"; "Right Leg"; "Torso"; |
| 110 | - | while firing do -- hold down the mouse button for a continuous attack |
| 110 | + | |
| 111 | ||
| 112 | - | Tool.Enabled = false |
| 112 | + | function matches(partname) |
| 113 | - | wait(.25) |
| 113 | + | for i,v in pairs(acceptableparts) do |
| 114 | if partname == v then | |
| 115 | - | Tool.Handle.attack:stop() |
| 115 | + | return true |
| 116 | - | Tool.Handle.idle:play() |
| 116 | + | |
| 117 | - | connection:disconnect() |
| 117 | + | |
| 118 | return false | |
| 119 | end | |
| 120 | ||
| 121 | - | function onDeactivated() |
| 121 | + | local damage = 5 |
| 122 | - | firing = false |
| 122 | + | |
| 123 | function blow(hit) | |
| 124 | if (hit.Parent == nil) then return end | |
| 125 | - | function onEquipped() --gotta start the sounds! |
| 125 | + | |
| 126 | - | Tool.Handle.idle:play() |
| 126 | + | if matches(hit.Name) then |
| 127 | - | Tool.Handle.start:play() |
| 127 | + | |
| 128 | local humanoid = hit.Parent:findFirstChild("Humanoid")
| |
| 129 | local vCharacter = Tool.Parent | |
| 130 | local vPlayer = game.Players:playerFromCharacter(vCharacter) | |
| 131 | local hum = vCharacter:findFirstChild("Humanoid")
| |
| 132 | - | script.Parent.Deactivated:connect(onDeactivated) |
| 132 | + | if humanoid and humanoid ~= hum and hum then |
| 133 | -- final check, make sure sword is in-hand | |
| 134 | local guygettingsliced = game.Players:GetPlayerFromCharacter(hit.Parent) --OH LOOK, here's an edit | |
| 135 | local right_arm = vCharacter:FindFirstChild("Right Arm")
| |
| 136 | if (right_arm) then | |
| 137 | local joint = right_arm:FindFirstChild("RightGrip")
| |
| 138 | - | Part2.Name = "Handle" |
| 138 | + | if (joint and (joint.Part0 == sword or joint.Part1 == sword)) then |
| 139 | - | Part2.Parent = Tool0 |
| 139 | + | if guygettingsliced then --If he's a player |
| 140 | - | Part2.Material = Enum.Material.SmoothPlastic |
| 140 | + | if candamage(vPlayer.TeamColor, guygettingsliced.TeamColor) == true then |
| 141 | - | Part2.BrickColor = BrickColor.new("Dark stone grey")
|
| 141 | + | tagHumanoid(humanoid, vPlayer) |
| 142 | - | Part2.Reflectance = 0.40000000596046 |
| 142 | + | humanoid:TakeDamage(damage) |
| 143 | - | Part2.Rotation = Vector3.new(-90, 56, 90) |
| 143 | + | wait(1) |
| 144 | - | Part2.FormFactor = Enum.FormFactor.Plate |
| 144 | + | untagHumanoid(humanoid) |
| 145 | - | Part2.Size = Vector3.new(1, 0.800000012, 4) |
| 145 | + | end |
| 146 | - | Part2.CFrame = CFrame.new(-6.00945282, 1.45000994, -11.5, 0, -0.559192896, 0.829037607, 0, 0.829037607, 0.559192896, -1, 0, 0) |
| 146 | + | else --If he's not a player (AI, shop, etc) |
| 147 | - | Part2.BottomSurface = Enum.SurfaceType.Smooth |
| 147 | + | tagHumanoid(humanoid, vPlayer) |
| 148 | - | Part2.TopSurface = Enum.SurfaceType.Smooth |
| 148 | + | humanoid:TakeDamage(damage) |
| 149 | - | Part2.Color = Color3.new(0.388235, 0.372549, 0.384314) |
| 149 | + | wait(1) |
| 150 | - | Part2.Position = Vector3.new(-6.00945282, 1.45000994, -11.5) |
| 150 | + | untagHumanoid(humanoid) |
| 151 | - | Part2.Orientation = Vector3.new(-34, 90, 0) |
| 151 | + | end |
| 152 | - | Part2.Color = Color3.new(0.388235, 0.372549, 0.384314) |
| 152 | + | |
| 153 | - | Sound3.Name = "idle" |
| 153 | + | |
| 154 | - | Sound3.Parent = Part2 |
| 154 | + | |
| 155 | - | Sound3.SoundId = "http://www.roblox.com/asset/?id=2766581" |
| 155 | + | |
| 156 | - | Sound3.Volume = 1 |
| 156 | + | |
| 157 | - | Sound3.Looped = true |
| 157 | + | |
| 158 | - | Sound4.Name = "attack" |
| 158 | + | |
| 159 | - | Sound4.Parent = Part2 |
| 159 | + | |
| 160 | - | Sound4.SoundId = "http://www.roblox.com/asset/?id=161420059" |
| 160 | + | |
| 161 | function tagHumanoid(humanoid, player) | |
| 162 | - | Sound5.Name = "start" |
| 162 | + | local creator_tag = Instance.new("ObjectValue")
|
| 163 | - | Sound5.Parent = Part2 |
| 163 | + | |
| 164 | - | Sound5.SoundId = "rbxassetid://258741207" |
| 164 | + | |
| 165 | - | Sound5.Volume = 2 |
| 165 | + | |
| 166 | - | SpecialMesh6.Name = "KnifeMesh" |
| 166 | + | |
| 167 | - | SpecialMesh6.Parent = Part2 |
| 167 | + | |
| 168 | - | SpecialMesh6.MeshId = "rbxassetid://536945307" |
| 168 | + | |
| 169 | - | SpecialMesh6.Offset = Vector3.new(0, -0.200000003, 0) |
| 169 | + | |
| 170 | - | SpecialMesh6.Scale = Vector3.new(0.111000001, 0.111000001, 0.111000001) |
| 170 | + | |
| 171 | - | SpecialMesh6.TextureId = "rbxassetid://536945378" |
| 171 | + | |
| 172 | - | SpecialMesh6.MeshType = Enum.MeshType.FileMesh |
| 172 | + | |
| 173 | - | SpecialMesh6.Scale = Vector3.new(0.111000001, 0.111000001, 0.111000001) |
| 173 | + | |
| 174 | - | Script7.Name = "Entry" |
| 174 | + | |
| 175 | - | Script7.Parent = mas |
| 175 | + | |
| 176 | - | table.insert(cors,sandbox(Script7,function() |
| 176 | + | |
| 177 | - | function enter(plyr) |
| 177 | + | |
| 178 | - | plyr.CharacterAdded:connect(function() |
| 178 | + | function attack() |
| 179 | - | print("Corpsifying...")
|
| 179 | + | damage = slash_damage |
| 180 | - | local scrip = script.Corpse:clone() |
| 180 | + | SlashSound:play() |
| 181 | - | scrip.Disabled = false |
| 181 | + | local anim = Instance.new("StringValue")
|
| 182 | - | scrip.Parent = plyr.Character |
| 182 | + | anim.Name = "toolanim" |
| 183 | - | end) |
| 183 | + | anim.Value = "Slash" |
| 184 | anim.Parent = Tool | |
| 185 | end | |
| 186 | - | game.Players.PlayerAdded:connect(enter) |
| 186 | + | |
| 187 | - | for i, v in pairs(game.Players:GetChildren()) do |
| 187 | + | function lunge() |
| 188 | - | repeat wait() until v.Character |
| 188 | + | damage = lunge_damage |
| 189 | - | if v.Character:findFirstChild("Corpse") == nil then
|
| 189 | + | |
| 190 | - | local scrip = script.Corpse:clone() |
| 190 | + | LungeSound:play() |
| 191 | - | scrip.Disabled = false |
| 191 | + | |
| 192 | - | scrip.Parent = v.Character |
| 192 | + | local anim = Instance.new("StringValue")
|
| 193 | - | enter(v) |
| 193 | + | anim.Name = "toolanim" |
| 194 | anim.Value = "Lunge" | |
| 195 | anim.Parent = Tool | |
| 196 | ||
| 197 | ||
| 198 | - | Script8.Name = "Corpse" |
| 198 | + | force = Instance.new("BodyVelocity")
|
| 199 | - | Script8.Parent = Script7 |
| 199 | + | force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 |
| 200 | - | Script8.Disabled = true |
| 200 | + | force.maxForce = Vector3.new(0,2900,0) |
| 201 | - | table.insert(cors,sandbox(Script8,function() |
| 201 | + | force.Parent = Tool.Parent.Torso |
| 202 | - | Character = script.Parent |
| 202 | + | wait(.25) |
| 203 | - | Humanoid = Character.Humanoid |
| 203 | + | swordOut() |
| 204 | - | Torso = Character.Torso |
| 204 | + | wait(.25) |
| 205 | force.Parent = nil | |
| 206 | - | function OnDeath() |
| 206 | + | wait(.5) |
| 207 | - | print("Death")
|
| 207 | + | swordUp() |
| 208 | - | local cleaner = script:findFirstChild("BodyCleanup")
|
| 208 | + | |
| 209 | - | cleaner.Parent = nil |
| 209 | + | damage = slash_damage |
| 210 | - | cleaner.Disabled = false |
| 210 | + | |
| 211 | - | Character.archivable = true |
| 211 | + | |
| 212 | - | oldCharacter = Character |
| 212 | + | function swordUp() |
| 213 | - | Humanoid.MaxHealth = 0 |
| 213 | + | Tool.GripForward = Vector3.new(-1,0,0) |
| 214 | - | for i,v in pairs(oldCharacter.Head:GetChildren()) do |
| 214 | + | Tool.GripRight = Vector3.new(0,1,0) |
| 215 | - | if v:IsA("Sound") then
|
| 215 | + | Tool.GripUp = Vector3.new(0,0,1) |
| 216 | - | v:Remove() |
| 216 | + | |
| 217 | ||
| 218 | function swordOut() | |
| 219 | - | Character = Character:Clone() |
| 219 | + | Tool.GripForward = Vector3.new(0,0,1) |
| 220 | - | Character.Parent = workspace |
| 220 | + | Tool.GripRight = Vector3.new(0,-1,0) |
| 221 | - | Character.Name = "" |
| 221 | + | Tool.GripUp = Vector3.new(-1,0,0) |
| 222 | - | Character:findFirstChild("Corpse"):Remove()
|
| 222 | + | |
| 223 | - | for i,v in pairs(oldCharacter:GetChildren()) do |
| 223 | + | |
| 224 | - | if v:IsA("BasePart") then
|
| 224 | + | function swordAcross() |
| 225 | - | v.CanCollide = false |
| 225 | + | -- parry |
| 226 | - | v.Transparency = 1 |
| 226 | + | |
| 227 | ||
| 228 | ||
| 229 | - | Humanoid.Parent = nil |
| 229 | + | Tool.Enabled = true |
| 230 | - | cleaner.Parent = Character |
| 230 | + | local last_attack = 0 |
| 231 | - | Torso = Character:findFirstChild("Torso")
|
| 231 | + | |
| 232 | - | if Torso then |
| 232 | + | |
| 233 | - | local Head = Character:FindFirstChild("Head")
|
| 233 | + | |
| 234 | - | if Head then |
| 234 | + | |
| 235 | - | local Neck = Instance.new("Weld")
|
| 235 | + | |
| 236 | - | Neck.Name = "Neck" |
| 236 | + | |
| 237 | - | Neck.Part0 = Torso |
| 237 | + | |
| 238 | - | Neck.Part1 = Head |
| 238 | + | |
| 239 | - | Neck.C0 = CFrame.new(0, 1.5, 0) |
| 239 | + | local character = Tool.Parent; |
| 240 | - | Neck.C1 = CFrame.new() |
| 240 | + | |
| 241 | - | Neck.Parent = Torso |
| 241 | + | |
| 242 | print("Humanoid not found")
| |
| 243 | - | local Limb = Character:FindFirstChild("Right Arm")
|
| 243 | + | |
| 244 | - | if Limb then |
| 244 | + | |
| 245 | ||
| 246 | - | Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0) |
| 246 | + | t = r.Stepped:wait() |
| 247 | - | local Joint = Instance.new("Glue")
|
| 247 | + | |
| 248 | - | Joint.Name = "RightShoulder" |
| 248 | + | if (t - last_attack < .2) then |
| 249 | - | Joint.Part0 = Torso |
| 249 | + | lunge() |
| 250 | - | Joint.Part1 = Limb |
| 250 | + | |
| 251 | - | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) |
| 251 | + | attack() |
| 252 | - | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) |
| 252 | + | |
| 253 | - | Joint.Parent = Torso |
| 253 | + | |
| 254 | last_attack = t | |
| 255 | - | local B = Instance.new("Part")
|
| 255 | + | |
| 256 | - | B.TopSurface = 0 |
| 256 | + | --wait(.5) |
| 257 | - | B.BottomSurface = 0 |
| 257 | + | |
| 258 | - | B.formFactor = "Symmetric" |
| 258 | + | |
| 259 | - | B.Size = Vector3.new(1, 1, 1) |
| 259 | + | |
| 260 | - | B.Transparency = 1 |
| 260 | + | |
| 261 | - | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) |
| 261 | + | |
| 262 | - | B.Parent = Character |
| 262 | + | |
| 263 | - | local W = Instance.new("Weld")
|
| 263 | + | |
| 264 | - | W.Part0 = Limb |
| 264 | + | |
| 265 | - | W.Part1 = B |
| 265 | + | connection = sword.Touched:connect(blow) |
| 266 | - | W.C0 = CFrame.new(0, -0.5, 0) |
| 266 | + | |
| 267 | - | W.Parent = Limb |
| 267 | + | |
| 268 | ||
| 269 | end)) | |
| 270 | - | local Limb = Character:FindFirstChild("Left Arm")
|
| 270 | + | |
| 271 | - | if Limb then |
| 271 | + | |
| 272 | pcall(function() v:MakeJoints() end) | |
| 273 | - | Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0) |
| 273 | + | |
| 274 | - | local Joint = Instance.new("Glue")
|
| 274 | + | |
| 275 | - | Joint.Name = "LeftShoulder" |
| 275 | + | |
| 276 | - | Joint.Part0 = Torso |
| 276 | + | |
| 277 | - | Joint.Part1 = Limb |
| 277 | + | |
| 278 | - | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) |
| 278 | + | |
| 279 | - | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) |
| 279 | + |