Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- --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")
- Sound2 = Instance.new("Sound")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- SpecialMesh10 = Instance.new("SpecialMesh")
- Sound11 = Instance.new("Sound")
- RemoteEvent12 = Instance.new("RemoteEvent")
- LocalScript13 = Instance.new("LocalScript")
- Script14 = Instance.new("Script")
- Camera15 = Instance.new("Camera")
- Tool0.Name = "Pistol"
- Tool0.Parent = mas
- Tool0.TextureId = "rbxassetid://168510890"
- Tool0.Grip = CFrame.new(0.014765705, -0.0876774788, 0.452041, 0.999586999, 0, 0.02873604, 0, 1, 0, -0.02873604, 0, 0.999586999)
- Tool0.GripForward = Vector3.new(-0.02873604, -0, -0.999586999)
- Tool0.GripPos = Vector3.new(0.014765705, -0.0876774788, 0.452041)
- Tool0.GripRight = Vector3.new(0.999586999, 0, -0.02873604)
- Tool0.ToolTip = "Gun to kill skids."
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(1.841434, 0.946837008, -16.1359825, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872)
- Part1.Orientation = Vector3.new(-15, 0, 0)
- Part1.Position = Vector3.new(1.841434, 0.946837008, -16.1359825)
- Part1.Rotation = Vector3.new(-15, 0, 0)
- Part1.Size = Vector3.new(0.230000198, 0.0500000007, 0.290000528)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Sound2.Name = "shatter"
- Sound2.Parent = Part1
- Sound2.Pitch = 2
- Sound2.PlaybackSpeed = 2
- Sound2.SoundId = "rbxassetid://2978605361"
- Sound3.Name = "empty"
- Sound3.Parent = Part1
- Sound3.Volume = 4
- Sound4.Name = "equip"
- Sound4.Parent = Part1
- Sound4.SoundId = "rbxassetid://628897044"
- Sound5.Name = "unequip"
- Sound5.Parent = Part1
- Sound5.SoundId = "rbxassetid://663514083"
- Sound6.Name = "supersonic bullet crack"
- Sound6.Parent = Part1
- Sound6.EmitterSize = 1
- Sound6.MinDistance = 1
- Sound6.Pitch = 1.5
- Sound6.PlaybackSpeed = 1.5
- Sound6.SoundId = "rbxassetid://259586543"
- Sound6.Volume = 1
- Sound7.Name = "bullethitflesh"
- Sound7.Parent = Part1
- Sound7.SoundId = "rbxassetid://3092866899"
- Sound8.Name = "bullethit"
- Sound8.Parent = Part1
- Sound8.SoundId = "rbxassetid://1489924400"
- Sound9.Name = "boom"
- Sound9.Parent = Part1
- Sound9.SoundId = "rbxassetid://2898512514"
- Sound9.Volume = 10
- SpecialMesh10.Parent = Part1
- SpecialMesh10.MeshId = "http://www.roblox.com/asset/?id=19999257"
- SpecialMesh10.Scale = Vector3.new(0.99000001, 0.899999976, 0.949999988)
- SpecialMesh10.TextureId = "http://www.roblox.com/asset/?id=205502594"
- SpecialMesh10.MeshType = Enum.MeshType.FileMesh
- Sound11.Name = "gunshot"
- Sound11.Parent = Part1
- Sound11.SoundId = "rbxassetid://663514083"
- RemoteEvent12.Name = "GunEvent"
- RemoteEvent12.Parent = Tool0
- LocalScript13.Name = "ShootLocal"
- LocalScript13.Parent = Tool0
- table.insert(cors,sandbox(LocalScript13,function()
- --By Rufus14
- tool = script.Parent
- playermouse = game:GetService("Players").LocalPlayer:GetMouse()
- runservice = game:GetService("RunService").RenderStepped
- gunevent = tool.GunEvent
- function onpress()
- gunevent:FireServer("shoot", playermouse.Hit.p, playermouse.Origin.p)
- end
- tool.Activated:connect(onpress)
- function removearms()
- if game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("RightArmWeld") then
- game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("RightArmWeld"):destroy()
- end
- if game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("HeadWeld") then
- game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("HeadWeld"):destroy()
- end
- if game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("LeftArmWeld") then
- game:GetService("Players").LocalPlayer.Character.Torso:findFirstChild("LeftArmWeld"):destroy()
- end
- if game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld") then
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld"):destroy()
- end
- end
- tool.Unequipped:connect(removearms)
- while runservice:wait() do
- if tool.Parent == game:GetService("Players").LocalPlayer.Character then
- if (workspace.CurrentCamera.CFrame.p - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude < 1.3 then
- if game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld") then
- gunevent:FireServer("point", playermouse.Hit.p, playermouse.Origin.p)
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.HumanoidRootPartWeld.C0 = CFrame.fromEulerAnglesXYZ(0,math.pi/3,0)
- else
- local humanoidrootpart = Instance.new("Weld", game:GetService("Players").LocalPlayer.Character.HumanoidRootPart)
- humanoidrootpart.Part0 = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart
- humanoidrootpart.Part1 = game:GetService("Players").LocalPlayer.Character.Torso
- humanoidrootpart.Name = "HumanoidRootPartWeld"
- end
- else
- if game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld") then
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeld"):destroy()
- end
- gunevent:FireServer("point", playermouse.Hit.p, playermouse.Origin.p)
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(playermouse.Hit.p.x,game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.y,playermouse.Hit.p.z)) * CFrame.fromEulerAnglesXYZ(0,math.pi/3,0)
- end
- end
- end
- end))
- Script14.Name = "ShootScript"
- Script14.Parent = Tool0
- table.insert(cors,sandbox(Script14,function()
- --By Rufus14
- canuse = true
- heartbeat = game:GetService("RunService").Heartbeat
- tool = script.Parent
- handle = tool.Handle
- shoot = handle.gunshot
- shattersound = handle.shatter
- empty = handle.empty
- shootevent = tool.GunEvent
- boom = handle.boom
- equip = handle.equip
- unequip = handle.unequip
- bullethitflesh = handle.bullethitflesh
- bullethit = handle.bullethit
- bulletcrack = handle["supersonic bullet crack"]
- function positiongun()
- equip:Play()
- unequip:Play()
- wait(6)
- boom:Play()
- local ex = Instance.new("Explosion",workspace)
- ex.Position = handle.Position
- ex.BlastRadius = 30
- ex.BlastPressure = 500
- end
- function resetgun()
- wait(9)
- boom:Play()
- local ex = Instance.new("Explosion",workspace)
- ex.Position = handle.Position
- ex.BlastRadius = 50
- ex.BlastPressure = 9e9
- handle:destroy()
- end
- tool.Unequipped:connect(resetgun)
- tool.Equipped:connect(positiongun)
- function dosomething(plr, whataction, pos, origin)
- if whataction == "shoot" then
- if canuse then
- canuse = false
- for i = 1,10 do
- plr.Character.Torso:findFirstChild("RightArmWeld").C1 = plr.Character.Torso:findFirstChild("RightArmWeld").C1 * CFrame.fromEulerAnglesXYZ(-0.055,0,0)
- end
- boom:Play()
- local ex = Instance.new("Explosion",handle)
- ex.Position = handle.Position
- ex.BlastRadius = 50
- ex.BlastPressure = 9e9
- local light = Instance.new("PointLight", handle)
- light.Brightness = 10
- local ray = Ray.new(handle.Position, (pos - handle.Position).unit * 400)
- local hit, position = workspace:FindPartOnRayWithIgnoreList(ray, {handle, tool.Parent["Right Arm"]})
- local part = Instance.new("Part", handle)
- part.Anchored = true
- part.CanCollide = false
- part.Material = "Neon"
- part.Size = Vector3.new(0,0,(handle.Position - position).magnitude/4)
- part.CFrame = CFrame.new(handle.Position, position) * CFrame.new(0,0,-(handle.Position - position).magnitude/2)
- local function hide()
- bulletcrack.Parent = part
- bulletcrack:Play()
- bulletcrack.MaxDistance = part.Size.z
- wait(0.01)
- part.Transparency = 1
- wait(bulletcrack.TimeLength - 0.01)
- bulletcrack.Parent = handle
- part:destroy()
- end
- spawn(hide)
- game.Debris:AddItem(light, 0.04)
- local function makewound(hitt)
- local ball = Instance.new("Part", hitt.Parent)
- ball.Shape = "Ball"
- ball.Name = "ouchwound"
- ball.Transparency = hitt.Transparency
- ball.CanCollide = false
- ball.Size = Vector3.new(0.25,0.25,0.25)
- ball.CFrame = CFrame.new(position.x,position.y,position.z)
- local hitweld = Instance.new("Weld", hitt)
- ball.CFrame = CFrame.new(ball.Position, handle.Position)
- hitweld.C0 = hitt.CFrame:toObjectSpace(ball.CFrame)
- hitweld.Part0 = hitt
- hitweld.Part1 = ball
- hitweld.Name = "ouch_weld"
- hitweld.C0 = hitweld.C0 * CFrame.new(0,0,0.1)
- bullethit.Parent = ball
- if hitt.Name == "ouchwound" then
- ball.Transparency = 1
- local function waittoremove()
- wait(3)
- ball:destroy()
- end
- spawn(waittoremove)
- end
- bullethit:Play()
- bullethit.MaxDistance = 10
- if hitt.Parent:findFirstChildOfClass("Humanoid") then
- bullethitflesh.Parent = ball
- bullethitflesh:Play()
- bullethitflesh.MaxDistance = 10
- local randomdamage = math.random(40,80)
- if hitt.Parent:findFirstChildOfClass("Humanoid").Health > 500 then
- hitt.Parent:findFirstChildOfClass("Humanoid").MaxHealth = 500
- hitt.Parent:findFirstChildOfClass("Humanoid").Health = 500
- end
- if hitt.Parent:findFirstChildOfClass("Humanoid").Health <= randomdamage then
- local velocity = Instance.new("BodyVelocity", hit)
- velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
- velocity.Velocity = handle.CFrame.lookVector * -math.random(15,25)
- game.Debris:AddItem(velocity, 0.1)
- hitt.Parent:findFirstChildOfClass("Humanoid").Health = 0
- local function searchforweld(wot)
- for i,v in pairs(wot:GetChildren()) do
- searchforweld(v)
- if v.ClassName == "Weld" or v.ClassName == "Motor6D" and v.Name ~= "ouch_weld" then
- v:destroy()
- end
- end
- end
- searchforweld(hitt.Parent)
- ragdollkill(hitt.Parent)
- else
- if hitt.Name ~= "Head" then
- hitt.Parent:findFirstChildOfClass("Humanoid").Health = hitt.Parent:findFirstChildOfClass("Humanoid").Health - randomdamage
- local velocity = Instance.new("BodyVelocity", hit)
- velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
- velocity.Velocity = handle.CFrame.lookVector * -math.random(15,25)
- game.Debris:AddItem(velocity, 0.1)
- else
- hitt.Parent:findFirstChildOfClass("Humanoid").Health = 0
- local function searchforweld(wot)
- for i,v in pairs(wot:GetChildren()) do
- searchforweld(v)
- if v.ClassName == "Weld" or v.ClassName == "Motor6D" and v.Name ~= "ouch_weld" then
- v:destroy()
- end
- end
- end
- searchforweld(hitt.Parent)
- ragdollkill(hitt.Parent)
- end
- end
- local function bbb()
- wait(bullethitflesh.TimeLength)
- bullethitflesh.Parent = handle
- end
- spawn(bbb)
- ball.BrickColor = BrickColor.new("Maroon")
- ball.Material = "Pebble"
- else
- if not hitt.Parent:findFirstChildOfClass("Humanoid") and hitt.Parent.ClassName == "Model" then
- hitt:BreakJoints()
- local velocity = Instance.new("BodyVelocity", hitt)
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- velocity.Velocity = handle.CFrame.lookVector * -math.random(10,30)
- local function cancollide()
- wait(0.1)
- hitt.CanCollide = true
- velocity:destroy()
- end
- spawn(cancollide)
- end
- ball.BrickColor = hitt.BrickColor
- ball.Material = "Cobblestone"
- local function fadeaway()
- wait(20)
- for i = 1,100 do
- ball.Transparency = ball.Transparency + 0.01
- wait()
- end
- ball:destroy()
- end
- end
- local function aaa()
- wait(bullethit.TimeLength)
- bullethit.Parent = handle
- end
- spawn(aaa)
- end
- if hit ~= nil then
- if hit.Parent ~= nil then
- if not hit.Parent:findFirstChildOfClass("Humanoid") and not hit:findFirstChild("shattered") and hit.Name ~= "HumanoidRootPart" and hit.Transparency > 0.1 or hit.Material == "Glass" then
- if hit.Size.z < hit.Size.x then
- if hit.Size.z < 1.5 then
- local sha = Instance.new("BoolValue", hit)
- sha.Name = "shattered"
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(shatter.Size.x/2,shatter.Size.y/2,0)
- shatter:BreakJoints()
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(-shatter.Size.x/2,shatter.Size.y/2,0)
- shatter:BreakJoints()
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(shatter.Size.x/2,-shatter.Size.y/2,0)
- shatter:BreakJoints()
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z)
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(-shatter.Size.x/2,-shatter.Size.y/2,0)
- shatter:BreakJoints()
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- hit.Anchored = true
- hit.Transparency = 1
- hit.CanCollide = false
- local function stopshattering()
- shattersound.Parent = hit
- shattersound:Play()
- shattersound.MaxDistance = 30
- wait(shattersound.TimeLength/2)
- shattersound.Parent = handle
- hit:destroy()
- end
- spawn(stopshattering)
- end
- elseif hit.Size.x < hit.Size.z then
- if hit.Size.x < 1.5 then
- local sha = Instance.new("BoolValue", hit)
- sha.Name = "shattered"
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(0,shatter.Size.y/2,shatter.Size.z/2)
- shatter:BreakJoints()
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
- shatter:BreakJoints()
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(0,-shatter.Size.y/2,shatter.Size.z/2)
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(0,shatter.Size.y/2,-shatter.Size.z/2)
- shatter:BreakJoints()
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- local shatter = Instance.new("Part", workspace)
- shatter.Transparency = hit.Transparency
- shatter.Material = hit.Material
- shatter.BrickColor = hit.BrickColor
- shatter.Size = Vector3.new(hit.Size.x,hit.Size.y/2,hit.Size.z/2)
- shatter.CanCollide = hit.CanCollide
- shatter.CFrame = hit.CFrame * CFrame.new(0,-shatter.Size.y/2,-shatter.Size.z/2)
- shatter:BreakJoints()
- shatter.Velocity = handle.CFrame.lookVector * -20
- game.Debris:AddItem(shatter, 15)
- --
- hit.Anchored = true
- hit.Transparency = 1
- hit.CanCollide = false
- local function stopshattering()
- shattersound.Parent = hit
- shattersound:Play()
- shattersound.MaxDistance = 30
- wait(shattersound.TimeLength/2)
- shattersound.Parent = handle
- hit:destroy()
- end
- spawn(stopshattering)
- end
- end
- end
- end
- if hit.Parent.ClassName == "Accessory" or hit.Parent.ClassName == "Hat" then
- for i,v in pairs(hit:GetChildren()) do
- if v.ClassName == "Attachment" or v.ClassName == "Weld" or v.ClassName == "Motor6D" then
- v:destroy()
- end
- end
- hit.Parent.Parent = workspace
- hit.CanCollide = false
- local velocity = Instance.new("BodyVelocity", hit)
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- velocity.Velocity = handle.CFrame.lookVector * -math.random(10,30)
- local function cancollide()
- wait(0.1)
- hit.CanCollide = true
- velocity:destroy()
- end
- spawn(cancollide)
- else
- makewound(hit)
- end
- end
- for i = 1,10 do
- if plr.Character.Torso:findFirstChild("RightArmWeld") then
- plr.Character.Torso:findFirstChild("RightArmWeld").C1 = plr.Character.Torso:findFirstChild("RightArmWeld").C1 * CFrame.fromEulerAnglesXYZ(0.055,0,0)
- heartbeat:wait()
- end
- end
- canuse = true
- end
- elseif whataction == "point" then
- if plr.Character:findFirstChild("Torso") then
- if not plr.Character.Torso:findFirstChild("HeadWeld") then
- local head = Instance.new("Weld", plr.Character.Torso)
- head.Part0 = plr.Character.Torso
- head.Part1 = plr.Character.Head
- head.C0 = CFrame.new(0,1.5,0)
- head.C1 = CFrame.new(0,-0.5,0)
- head.Name = "HeadWeld"
- end
- if not plr.Character.Torso:findFirstChild("RightArmWeld") then
- local rightarm = Instance.new("Weld", plr.Character.Torso)
- rightarm.Part0 = plr.Character.Torso
- rightarm.Part1 = plr.Character["Right Arm"]
- rightarm.C0 = CFrame.new(1.5,0,0)
- rightarm.C1 = CFrame.new(0,0.5,0)
- rightarm.Name = "RightArmWeld"
- end
- if not plr.Character.Torso:findFirstChild("LeftArmWeld") then
- local leftarm = Instance.new("Weld", plr.Character.Torso)
- leftarm.Part0 = plr.Character.Torso
- leftarm.Part1 = plr.Character["Left Arm"]
- leftarm.C0 = CFrame.new(-1.5,0,0)
- leftarm.C1 = CFrame.new(0,0.5,0)
- leftarm.Name = "LeftArmWeld"
- end
- if plr.Character.Torso:findFirstChild("RightArmWeld") then
- plr.Character.Torso:findFirstChild("RightArmWeld").C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,math.pi/3) * CFrame.fromEulerAnglesXYZ(math.asin((pos-origin).unit.y),0,0)
- end
- if plr.Character.Torso:findFirstChild("HeadWeld") then
- plr.Character.Torso:findFirstChild("HeadWeld").C0 = CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(math.asin((pos-origin).unit.y),-math.pi/3,0)
- end
- if plr.Character.Torso:findFirstChild("LeftArmWeld") then
- plr.Character.Torso:findFirstChild("LeftArmWeld").C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.asin((pos-origin).unit.y)/2,0,0)
- end
- end
- end
- end
- shootevent.OnServerEvent:connect(dosomething)
- function ragdollkill(character)
- local victimshumanoid = character:findFirstChildOfClass("Humanoid")
- if not character:findFirstChild("UpperTorso") then
- character.Archivable = true
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Sound" then
- v:remove()
- end
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Sound" then
- w:remove()
- end
- end
- end
- local ragdoll = character:Clone()
- ragdoll:findFirstChildOfClass("Humanoid").Health = 0
- if ragdoll:findFirstChild("Health") then
- if ragdoll:findFirstChild("Health").ClassName == "Script" then
- ragdoll:findFirstChild("Health").Disabled = true
- end
- end
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
- v:destroy()
- end
- end
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(character:GetChildren()) do
- if w.ClassName == "Part" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- ragdoll.Parent = workspace
- if ragdoll:findFirstChild("Right Arm") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Right Arm")
- glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Left Arm") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Left Arm")
- glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Name = "LimbCollider"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Left Leg") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Left Leg")
- glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Name = "LimbCollider"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Right Leg") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Right Leg")
- glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Name = "LimbCollider"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
- local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- local connection = Instance.new('HingeConstraint', ragdoll["Head"])
- connection.LimitsEnabled = true
- connection.Attachment0 = ragdoll.Torso.NeckAttachment
- connection.Attachment1 = HeadAttachment
- connection.UpperAngle = 60
- connection.LowerAngle = -60
- elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
- local hedweld = Instance.new("Weld", ragdoll.Torso)
- hedweld.Part0 = ragdoll.Torso
- hedweld.Part1 = ragdoll.Head
- hedweld.C0 = CFrame.new(0,1.5,0)
- end
- game.Debris:AddItem(ragdoll, 30)
- local function aaaalol()
- wait(0.2)
- local function searchforvelocity(wot)
- for i,v in pairs(wot:GetChildren()) do
- searchforvelocity(v)
- if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
- v:destroy()
- end
- end
- end
- searchforvelocity(ragdoll)
- wait(0.5)
- if ragdoll:findFirstChildOfClass("Humanoid") then
- ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
- end
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll:findFirstChild("HumanoidRootPart"):destroy()
- end
- end
- spawn(aaaalol)
- elseif character:findFirstChild("UpperTorso") then
- character.Archivable = true
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Sound" then
- v:remove()
- end
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Sound" then
- w:remove()
- end
- end
- end
- local ragdoll = character:Clone()
- ragdoll:findFirstChildOfClass("Humanoid").Health = 0
- if ragdoll:findFirstChild("Health") then
- if ragdoll:findFirstChild("Health").ClassName == "Script" then
- ragdoll:findFirstChild("Health").Disabled = true
- end
- end
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
- v:destroy()
- end
- end
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(character:GetChildren()) do
- if w.ClassName == "Part" or w.ClassName == "MeshPart" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- ragdoll.Parent = workspace
- local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
- Humanoid.PlatformStand = true
- local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
- local connection = Instance.new('HingeConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = lower
- connection.UpperAngle = upper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
- end
- makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
- makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
- makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
- makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
- makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
- makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
- for i,v in pairs(Humanoid.Parent:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(Humanoid.Parent:GetChildren()) do
- if w.ClassName == "Part" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- for i,v in pairs(ragdoll:GetChildren()) do
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] then
- w:destroy()
- end
- end
- end
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart.Anchored = true
- ragdoll.HumanoidRootPart.CanCollide = false
- end
- if ragdoll:findFirstChildOfClass("Humanoid") then
- ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
- end
- local function waitfordatmoment()
- wait(0.2)
- local function searchforvelocity(wot)
- for i,v in pairs(wot:GetChildren()) do
- searchforvelocity(v)
- if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
- v:destroy()
- end
- end
- end
- searchforvelocity(ragdoll)
- end
- spawn(waitfordatmoment)
- game.Debris:AddItem(ragdoll, 30)
- end
- end
- end))
- Camera15.Name = "ThumbnailCamera"
- Camera15.Parent = Tool0
- Camera15.CFrame = CFrame.new(3.01131964, 1.70072341, -15.2324295, 0.506096363, -0.263865292, 0.821122169, -0, 0.952051163, 0.305938959, -0.862476945, -0.154834598, 0.481829643)
- Camera15.CoordinateFrame = CFrame.new(3.01131964, 1.70072341, -15.2324295, 0.506096363, -0.263865292, 0.821122169, -0, 0.952051163, 0.305938959, -0.862476945, -0.154834598, 0.481829643)
- Camera15.Focus = CFrame.new(1.3690753, 1.08884549, -16.1960888, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera15.focus = CFrame.new(1.3690753, 1.08884549, -16.1960888, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 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
Add Comment
Please, Sign In to add comment