Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("vlad20020 made this")
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- local _rg = game
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,{
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then return s[k] end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end,
- })
- end
- local g = FakeService({
- GetService = function(self,s)
- return self[s]
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({RenderStepped=game:GetService("RunService").Heartbeat},"RunService")
- },game)
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- getmetatable(g).__index=function(self,s)
- return _rg:GetService(s) or typeof(_rg[s])=="function"
- and function(_,...)return _rg[s](_rg,...)end or _rg[s]
- end
- game = g
- owner = g.Players.LocalPlayer
- end
- --//Ragdoll Knife By vlad20020~//--
- local plr = game:GetService("Players").LocalPlayer
- local plrg = plr.PlayerGui
- local mouse = plr:GetMouse()
- local char = plr.Character
- local h = char.Head
- local t = char.Torso
- local ra = char["Right Arm"]
- local la = char["Left Arm"]
- local rl = char["Right Leg"]
- local ll = char["Left Leg"]
- local rs = t["Right Shoulder"]
- local ls = t["Left Shoulder"]
- local rh = t["Right Hip"]
- local lh = t["Left Hip"]
- local nec = t.Neck
- local rut = char.HumanoidRootPart
- local rutj = rut.RootJoint
- local hum = char:FindFirstChildOfClass("Humanoid")
- local attacc = true
- local attacc1 = true
- local using = false
- local rad = math.rad
- local huge = math.huge
- local scr = Instance.new("ScreenGui",plrg)
- local tex = Instance.new("TextLabel",scr) tex.BackgroundTransparency = 1 tex.Size = UDim2.new(.1,0,.1,0) tex.Position = UDim2.new(.45,0,.9,0) tex.TextTransparency = .8 tex.TextColor3 = Color3.new(1,1,1) tex.TextStrokeColor3 = Color3.fromRGB(255,100,0) tex.TextStrokeTransparency = .9 tex.TextScaled = true tex.Text = "vlad20020 MADE THIS"
- --//ArmJointParts~//--
- local tpr = Instance.new("Part",t) tpr.Size = Vector3.new(.1,.1,.1) tpr.CanCollide = false tpr.Transparency = 1
- local tpl = Instance.new("Part",t) tpl.Size = Vector3.new(.1,.1,.1) tpl.CanCollide = false tpl.Transparency = 1
- local tprw = Instance.new("Weld",t) tprw.Part0 = t tprw.Part1 = tpr tprw.C0 = CFrame.new(1,.5,0)
- local tplw = Instance.new("Weld",t) tplw.Part0 = t tplw.Part1 = tpl tplw.C0 = CFrame.new(-1,.5,0)
- --
- local rapr = Instance.new("Part",ra) rapr.Size = Vector3.new(.1,.1,.1) rapr.CanCollide = false rapr.Transparency = 1 --Right Arm
- local lapl = Instance.new("Part",la) lapl.Size = Vector3.new(.1,.1,.1) lapl.CanCollide = false lapl.Transparency = 1 --Left Arm
- local raprw = Instance.new("Weld",ra) raprw.Part0 = ra raprw.Part1 = rapr raprw.C0 = CFrame.new(-.5,.5,0)
- local laplw = Instance.new("Weld",la) laplw.Part0 = la laplw.Part1 = lapl laplw.C0 = CFrame.new(.5,.5,0)
- --/JointsWelds~//--
- local rsw = Instance.new("Weld",ra) rsw.Part0 = tpr rsw.Part1 = nil --Right Shoulder
- local lsw = Instance.new("Weld",la) lsw.Part0 = tpl lsw.Part1 = nil --Left Shoulder
- --//KnifeModel~//--
- local kn = Instance.new("Part",ra) kn.Size = Vector3.new(.1,.1,.1) kn.CanCollide = false kn.Name = "Knife"
- local km = Instance.new("FileMesh",kn) km.MeshId = "http://www.roblox.com/asset/?id=10604848" km.TextureId = "http://www.roblox.com/asset/?id=10605252" km.Offset = Vector3.new(0.5,0.5,0.5)
- local kw = Instance.new("Weld",kn) kw.Part0 = ra kw.Part1 = kn kw.C0 = CFrame.new(0,-1,0) * CFrame.Angles(rad(-90),rad(0),rad(0)) kw.Name = "KnifeWeld"
- local hb = Instance.new("Part",kn) hb.Size = Vector3.new(.2,2,.7) hb.CanCollide = false hb.Transparency = 1
- local hw = Instance.new("Weld",hb) hw.Part0 = kn hw.Part1 = hb hw.C0 = CFrame.new(0,1.3,0)
- local at1 = Instance.new("Attachment",hb) at1.Position = Vector3.new(0,.65,0) local at2 = Instance.new("Attachment",hb) at2.Position = Vector3.new(0,-.65,0)
- local trail = Instance.new("Trail",hb) trail.Attachment0 = at1 trail.Attachment1 = at2 trail.Enabled = false trail.Lifetime = .1 trail.Transparency = NumberSequence.new(.7)
- local hb1 = Instance.new("Part",kn) hb1.Size = Vector3.new(.2,2,.7) hb1.CanCollide = false hb1.Transparency = 1
- local hw1 = Instance.new("Weld",hb) hw1.Part0 = kn hw1.Part1 = hb1 hw1.C0 = CFrame.new(0,1.3,0)
- --//NeedfulFunctions~//--
- local bin = Instance.new("RemoteFunction",script)
- bin.OnServerInvoke = function(plr,sound1)
- local nec = plr.Character.Torso.Neck
- local mus = plr.Character:FindFirstChild(sound1)
- coroutine.resume(coroutine.create(function()
- while true do
- nec.C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(-180)) * CFrame.Angles(rad(-mus.PlaybackLoudness/40),rad(0),rad(0))
- swait()
- end
- end))
- end
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- frame = 1 / 60
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function sound(parent,id,vol,pit)
- local sound = Instance.new("Sound",parent)
- sound.Volume = vol
- sound.SoundId = "rbxassetid://"..id
- sound.Pitch = pit
- sound:Play()
- coroutine.resume(coroutine.create(function()
- repeat
- swait()
- until sound.Playing == false
- sound:Destroy()
- end))
- end
- function ragdoll(who)
- pcall(function()
- local ded = who
- local h1 = ded.Head
- local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
- if t1.Name == "UpperTorso" then
- sound(char,"949916584",10,1)
- local boom = Instance.new("Explosion",workspace) boom.Position = t1.Position boom.BlastRadius = 0
- ded.Parent = nil
- end
- local ff = ded:FindFirstChildOfClass("ForceField")
- if ff ~= nil then
- ff:Destroy()
- end
- local ra1 = ded["Right Arm"]
- local la1 = ded["Left Arm"]
- local rl1 = ded["Right Leg"]
- local ll1 = ded["Left Leg"]
- local hum1 = ded:FindFirstChildOfClass("Humanoid")
- local acc = ded:FindFirstChild("xdded")
- if acc == nil then
- local ac = Instance.new("Glue",ded) ac.Name = "xdded"
- local rut1 = ded:FindFirstChild("HumanoidRootPart")
- hum1.PlatformStand = true
- if rut1 ~= nil then
- rut1.Parent = nil
- end
- pcall(function()
- h1.Size = Vector3.new(1,1,1)
- for i,v in pairs(who:GetChildren()) do
- if v:IsA("Accessory") or v:IsA("Hat") then
- local gl = Instance.new("WeldConstraint",v.Handle)
- gl.Part0 = h1 gl.Part1 = v.Handle
- end
- end
- for i,v in pairs(who:GetChildren()) do
- if v:IsA("Script") or v:IsA("LocalScript") then
- if v.Name == "Health" then
- v.Parent = nil
- end
- end
- end
- for i,v in pairs(who:GetChildren()) do
- if v:IsA("BasePart") then
- v.Anchored = false
- end
- if v:IsA("Accessory") or v:IsA("Hat") then
- v.Handle.Anchored = false
- end
- end
- end)
- hum1.MaxHealth = 100
- hum1.Health = math.random(10,50)
- t1:BreakJoints()
- ra1:BreakJoints()
- la1:BreakJoints()
- rl1:BreakJoints()
- ll1:BreakJoints()
- --//Joints~//--
- --Neck--
- local nec = Instance.new("Attachment",h1) nec.Position = Vector3.new(0,-.5,0)
- local tnec = Instance.new("Attachment",t1) tnec.Position = Vector3.new(0,1,0)
- --Right Arm--
- local rsh = Instance.new("Attachment",ra1) rsh.Position = Vector3.new(0,.5,0)
- local trsh = Instance.new("Attachment",t1) trsh.Position = Vector3.new(1.5,.5,0)
- --Left Arm--
- local lsh = Instance.new("Attachment",la1) lsh.Position = Vector3.new(0,.5,0)
- local tlsh = Instance.new("Attachment",t1) tlsh.Position = Vector3.new(-1.5,.5,0)
- --Right Leg--
- local rhh = Instance.new("Attachment",rl1) rhh.Position = Vector3.new(0,1,0)
- local trhh = Instance.new("Attachment",t1) trhh.Position = Vector3.new(.5,-1,0)
- --Left Leg--
- local lhh = Instance.new("Attachment",ll1) lhh.Position = Vector3.new(0,1,0)
- local tlhh = Instance.new("Attachment",t1) tlhh.Position = Vector3.new(-.5,-1,0)
- --Ball Constraints--
- local rsb = Instance.new("BallSocketConstraint",t1) rsb.Attachment0 = rsh rsb.Attachment1 = trsh
- local lsb = Instance.new("BallSocketConstraint",t1) lsb.Attachment0 = lsh lsb.Attachment1 = tlsh
- local rrsb = Instance.new("BallSocketConstraint",t1) rrsb.Attachment0 = rhh rrsb.Attachment1 = trhh
- local llsb = Instance.new("BallSocketConstraint",t1) llsb.Attachment0 = lhh llsb.Attachment1 = tlhh
- local nsb = Instance.new("BallSocketConstraint",t1) nsb.Attachment0 = nec nsb.Attachment1 = tnec
- --//End of Joints~//--
- --//Colliders~//--
- --Parts--
- local cra = Instance.new("Part",t1) cra.Name = "yo" cra.Size = Vector3.new(1.5,1,1) cra.TopSurface = "Smooth" cra.BottomSurface = "Smooth" cra.Transparency = 1
- local cla = Instance.new("Part",t1) cla.Name = "yo" cla.Size = Vector3.new(1.5,1,1) cla.TopSurface = "Smooth" cla.BottomSurface = "Smooth" cla.Transparency = 1
- local crl = Instance.new("Part",t1) crl.Name = "yo" crl.Size = Vector3.new(1.5,1,1) crl.TopSurface = "Smooth" crl.BottomSurface = "Smooth" crl.Transparency = 1
- local cll = Instance.new("Part",t1) cll.Name = "yo" cll.Size = Vector3.new(1.5,1,1) cll.TopSurface = "Smooth" cll.BottomSurface = "Smooth" cll.Transparency = 1
- local ch = Instance.new("Part",t1) ch.Name = "yo" ch.Size = Vector3.new(1,.75,1) ch.TopSurface = "Smooth" ch.BottomSurface = "Smooth" ch.Transparency = 1
- --Welds--
- local wra = Instance.new("Weld",cra) wra.Part0 = ra1 wra.Part1 = cra wra.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wla = Instance.new("Weld",cla) wla.Part0 = la1 wla.Part1 = cla wla.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wrl = Instance.new("Weld",crl) wrl.Part0 = rl1 wrl.Part1 = crl wrl.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wll = Instance.new("Weld",cll) wll.Part0 = ll1 wll.Part1 = cll wll.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wh = Instance.new("Weld",ch) wh.Part0 = h1 wh.Part1 = ch
- --//End of Colliders~//--
- local pl = game:GetService("Players"):GetPlayerFromCharacter(who)
- coroutine.resume(coroutine.create(function()
- wait(5)
- if pl ~= nil then
- pl:LoadCharacter()
- end
- end))
- end
- end)
- end
- function ragdoll1(who)
- pcall(function()
- local ded = who
- local h1 = ded.Head
- local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
- if t1.Name == "UpperTorso" then
- sound(char,"949916584",10,1)
- local boom = Instance.new("Explosion",workspace) boom.Position = t1.Position boom.BlastRadius = 0
- ded.Parent = nil
- end
- local ff = ded:FindFirstChildOfClass("ForceField")
- if ff ~= nil then
- ff:Destroy()
- end
- local ra1 = ded["Right Arm"]
- local la1 = ded["Left Arm"]
- local rl1 = ded["Right Leg"]
- local ll1 = ded["Left Leg"]
- local hum1 = ded:FindFirstChildOfClass("Humanoid")
- local acc = ded:FindFirstChild("xdded")
- if acc == nil then
- local ac = Instance.new("Glue",ded) ac.Name = "xddedxd"
- local rut1 = ded:FindFirstChild("HumanoidRootPart")
- hum1.PlatformStand = true
- if rut1 ~= nil then
- rut1.Parent = nil
- end
- pcall(function()
- h1.Size = Vector3.new(1,1,1)
- for i,v in pairs(who:GetChildren()) do
- if v:IsA("Accessory") or v:IsA("Hat") then
- local gl = Instance.new("WeldConstraint",v.Handle)
- gl.Part0 = h1 gl.Part1 = v.Handle
- end
- end
- for i,v in pairs(who:GetChildren()) do
- if v:IsA("Script") or v:IsA("LocalScript") then
- if v.Name == "Health" then
- v.Parent = nil
- end
- end
- end
- for i,v in pairs(who:GetChildren()) do
- if v:IsA("BasePart") then
- v.Anchored = false
- end
- if v:IsA("Accessory") or v:IsA("Hat") then
- v.Handle.Anchored = false
- end
- end
- end)
- t1:BreakJoints()
- ra1:BreakJoints()
- la1:BreakJoints()
- rl1:BreakJoints()
- ll1:BreakJoints()
- --//Joints~//--
- --Neck--
- local nec = Instance.new("Attachment",h1) nec.Position = Vector3.new(0,-.5,0)
- local tnec = Instance.new("Attachment",t1) tnec.Position = Vector3.new(0,1,0)
- --Right Arm--
- local rsh = Instance.new("Attachment",ra1) rsh.Position = Vector3.new(0,.5,0)
- local trsh = Instance.new("Attachment",t1) trsh.Position = Vector3.new(1.5,.5,0)
- --Left Arm--
- local lsh = Instance.new("Attachment",la1) lsh.Position = Vector3.new(0,.5,0)
- local tlsh = Instance.new("Attachment",t1) tlsh.Position = Vector3.new(-1.5,.5,0)
- --Right Leg--
- local rhh = Instance.new("Attachment",rl1) rhh.Position = Vector3.new(0,1,0)
- local trhh = Instance.new("Attachment",t1) trhh.Position = Vector3.new(.5,-1,0)
- --Left Leg--
- local lhh = Instance.new("Attachment",ll1) lhh.Position = Vector3.new(0,1,0)
- local tlhh = Instance.new("Attachment",t1) tlhh.Position = Vector3.new(-.5,-1,0)
- --Ball Constraints--
- local rsb = Instance.new("BallSocketConstraint",t1) rsb.Attachment0 = rsh rsb.Attachment1 = trsh
- local lsb = Instance.new("BallSocketConstraint",t1) lsb.Attachment0 = lsh lsb.Attachment1 = tlsh
- local rrsb = Instance.new("BallSocketConstraint",t1) rrsb.Attachment0 = rhh rrsb.Attachment1 = trhh
- local llsb = Instance.new("BallSocketConstraint",t1) llsb.Attachment0 = lhh llsb.Attachment1 = tlhh
- local nsb = Instance.new("BallSocketConstraint",t1) nsb.Attachment0 = nec nsb.Attachment1 = tnec
- --//End of Joints~//--
- --//Colliders~//--
- --Parts--
- local cra = Instance.new("Part",t1) cra.Name = "yo" cra.Size = Vector3.new(1.5,1,1) cra.TopSurface = "Smooth" cra.BottomSurface = "Smooth" cra.Transparency = 1
- local cla = Instance.new("Part",t1) cla.Name = "yo" cla.Size = Vector3.new(1.5,1,1) cla.TopSurface = "Smooth" cla.BottomSurface = "Smooth" cla.Transparency = 1
- local crl = Instance.new("Part",t1) crl.Name = "yo" crl.Size = Vector3.new(1.5,1,1) crl.TopSurface = "Smooth" crl.BottomSurface = "Smooth" crl.Transparency = 1
- local cll = Instance.new("Part",t1) cll.Name = "yo" cll.Size = Vector3.new(1.5,1,1) cll.TopSurface = "Smooth" cll.BottomSurface = "Smooth" cll.Transparency = 1
- local ch = Instance.new("Part",t1) ch.Name = "yo" ch.Size = Vector3.new(1,.75,1) ch.TopSurface = "Smooth" ch.BottomSurface = "Smooth" ch.Transparency = 1
- --Welds--
- local wra = Instance.new("Weld",cra) wra.Part0 = ra1 wra.Part1 = cra wra.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wla = Instance.new("Weld",cla) wla.Part0 = la1 wla.Part1 = cla wla.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wrl = Instance.new("Weld",crl) wrl.Part0 = rl1 wrl.Part1 = crl wrl.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wll = Instance.new("Weld",cll) wll.Part0 = ll1 wll.Part1 = cll wll.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
- local wh = Instance.new("Weld",ch) wh.Part0 = h1 wh.Part1 = ch
- --//End of Colliders~//--
- who.Archivable = true
- local eag = who:Clone()
- eag.Parent = workspace
- eag:FindFirstChildOfClass("Humanoid").PlatformStand = true
- eag:FindFirstChildOfClass("Humanoid").MaxHealth = 100
- eag:FindFirstChildOfClass("Humanoid").Health = .1
- if who == char then
- eag["Right Arm"].Knife.Anchored = false
- eag["Right Arm"].Knife.CanCollide = true
- local kw1 = Instance.new("WeldConstraint",eag["Right Arm"].Knife) kw1.Part0 = eag.Torso kw1.Part1 = eag["Right Arm"].Knife
- end
- for i,v in pairs(eag:GetChildren()) do
- if v:IsA("Script") or v:IsA("LocalScript") then
- v:Destroy()
- end
- end
- for i,v in pairs(who:GetChildren()) do
- if v.Name == "Head" then
- v:Destroy()
- end
- if v:IsA("BasePart") then
- v:Destroy()
- end
- if v:IsA("Accessory") or v:IsA("Hat") then
- v:Destroy()
- end
- end
- end
- end)
- end
- function hitbox(hit)
- pcall(function()
- local ea = hit.Parent:FindFirstChildOfClass("Humanoid")
- if ea ~= nil and attacc == false and ea.Parent:FindFirstChild("xdded") == nil and ea.Parent:FindFirstChild("xddedxd") == nil then
- attacc = true
- sound(hit,"135925117",3,1)
- ragdoll(ea.Parent)
- elseif ea ~= nil and not attacc and hit.Parent:IsA("Accessory") then
- attacc = true
- sound(hit,"135925117",3,1)
- ragdoll(ea.Parent)
- elseif not attacc and not ea then
- attacc = true
- sound(hit,"135925117",3,1)
- end
- end)
- end
- function hitbox1(hit)
- pcall(function()
- local ea = hit.Parent:FindFirstChildOfClass("Humanoid")
- if ea ~= nil and attacc1 == false and ea.Parent:FindFirstChild("xdded") ~= nil then
- attacc1 = true
- ea.Parent:FindFirstChild("xdded"):Destroy()
- sound(hit,"135925117",3,1)
- for i,v in pairs(ea.Parent.Torso:GetChildren()) do
- if v.Name == "yo" then
- v:Destroy()
- end
- end
- ragdoll1(ea.Parent)
- end
- attacc1 = true
- end)
- end
- hb.Touched:connect(hitbox)
- hb1.Touched:connect(hitbox1)
- function look(to)
- rut.CFrame = CFrame.new(rut.CFrame.p,Vector3.new(to.x,rut.CFrame.y,to.z))
- end
- function fknife(to)
- local ay = false
- local knf = Instance.new("Part",workspace) knf.Size = Vector3.new(.3,.3,.6) knf.CanCollide = true knf.Name = "Knife" knf.CFrame = ra.CFrame * CFrame.new(0,-4.5,0) * CFrame.Angles(rad(math.random(-180,180)),rad(0),rad(0))
- local kmf = Instance.new("FileMesh",knf) kmf.MeshId = "http://www.roblox.com/asset/?id=10604848" kmf.TextureId = "http://www.roblox.com/asset/?id=10605252" kmf.Offset = Vector3.new(0,-1,0)
- local direc = Instance.new("BodyGyro",knf) direc.MaxTorque = Vector3.new(huge,huge,huge) direc.CFrame = CFrame.new(knf.Position,mouse.Hit.p)
- local vel = Instance.new("BodyVelocity",knf) vel.MaxForce = Vector3.new(huge,huge,huge) vel.Velocity = direc.CFrame.lookVector * 200
- knf.Touched:connect(function(hit)
- if hit ~= nil and not ay then
- local oofe = hit.Parent:FindFirstChildOfClass("Humanoid")
- if oofe ~= nil and oofe.Parent:FindFirstChild("xdded") == nil and oofe.Parent:FindFirstChild("xddedxd") == nil then
- knf:Destroy()
- ragdoll(oofe.Parent)
- sound(workspace,"201858024",4,1)
- if oofe ~= nil and oofe.Parent:FindFirstChild("xdded") ~= nil then
- ragdoll1(oofe.Parent)
- sound(workspace,"201858024",4,1)
- end
- end
- ay = true
- local we = Instance.new("WeldConstraint",knf) we.Part0 = knf we.Part1 = hit
- end
- end)
- coroutine.resume(coroutine.create(function()
- swait(3)
- direc:Destroy() vel:Destroy()
- wait(10)
- if knf ~= nil then
- for i = 1,10 do
- knf.Transparency = knf.Transparency +.1
- swait(2)
- if knf.Transparency >.999 then
- knf:Destroy()
- end
- end
- end
- end))
- end
- --//Attacks~//--
- function swing()
- using = true
- rsw.Part1 = rapr
- lsw.Part1 = lapl
- trail.Enabled = true
- for i = 0,.7,.06 do
- rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(200)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,-.5,-.5) * CFrame.Angles(rad(0),rad(160),rad(90)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(10),rad(-20)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-150),rad(0),rad(0)),i)
- swait()
- end
- attacc = false
- swait(2)
- for i = 0,.8,.08 do
- rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(160)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(.3,-.5,-.8) * CFrame.Angles(rad(0),rad(60),rad(90)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(25),rad(-30)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-100),rad(0),rad(0)),i)
- swait()
- end
- attacc = true
- for i = 0,.5,.05 do
- rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-90),rad(0),rad(0)),i)
- swait()
- end
- trail.Enabled = false
- rsw.Part1 = nil
- lsw.Part1 = nil
- using = false
- end
- function a()
- pcall(function()
- local ray = Ray.new(t.Position,(mouse.Hit.p - t.Position).unit * 5)
- local part,pos = workspace:FindPartOnRay(ray,char,false,true)
- if part ~= nil then
- local skid = part.Parent:FindFirstChildOfClass("Humanoid")
- if skid ~= nil and skid.Parent:FindFirstChild("xdded") == nil and skid.Parent:FindFirstChild("xddedxd") == nil then
- using = true
- local to = skid.Parent:FindFirstChild("Torso") or skid.Parent:FindFirstChild("UpperTorso")
- to.Anchored = true
- for i = 0,.5,.02 do
- rut.CFrame = rut.CFrame:lerp(to.CFrame * CFrame.new(0,0,2),i)
- swait()
- end
- rsw.Part1 = rapr
- trail.Enabled = true
- t.Anchored = true
- for i = 0,.3,.03 do
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,.35,0) * CFrame.Angles(rad(-10),rad(0),rad(-10)),i)
- swait()
- end
- for i = 0,.3,.03 do
- rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(200)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,.25,-.3) * CFrame.Angles(rad(60),rad(0),rad(-20)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-120),rad(0),rad(0)),i)
- swait()
- end
- sound(char,"201858024",3,1)
- wait(.5)
- t.Anchored = false
- ragdoll1(skid.Parent)
- skid.Health = 0
- for i = 0,1,.01 do
- rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-90),rad(0),rad(0)),i)
- swait()
- end
- trail.Enabled = false
- rsw.Part1 = nil
- using = false
- end
- end
- end)
- end
- function suiAHH()
- using = true
- rsw.Part1 = rapr
- lsw.Part1 = lapl
- hum.WalkSpeed = 0
- hum.JumpPower = 0
- t.Anchored = true
- trail.Enabled = true
- for i = 0,.5,.03 do
- rsw.C0 = rsw.C0:lerp(CFrame.new(.3,.5,-.5) * CFrame.Angles(rad(-20),rad(-80),rad(-60)) * CFrame.Angles(rad(50),rad(0),rad(0)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(10)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(90),rad(0),rad(0)),i)
- swait()
- end
- swait(17)
- for i = 0,.5,.03 do
- rsw.C0 = rsw.C0:lerp(CFrame.new(.5,.5,-.7) * CFrame.Angles(rad(-90),rad(-90),rad(80)) * CFrame.Angles(rad(0),rad(-10),rad(90)) * CFrame.Angles(rad(-60),rad(0),rad(0)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(25)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(90),rad(0),rad(0)),i)
- swait()
- end
- trail.Enabled = false
- sound(char,"201858024",3,1)
- kw:Destroy() kn.Anchored = true
- swait(20)
- for i = 0,.7,.01 do
- rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0),i)
- swait()
- end
- rsw.Part1 = nil lsw.Part1 = nil
- swait(25)
- t.Anchored = false
- ragdoll1(char)
- end
- function finish()
- using = true
- rsw.Part1 = rapr
- lsw.Part1 = lapl
- trail.Enabled = true
- for i = 0,.5,.03 do
- rutj.C0 = rutj.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-120),rad(0),rad(180)),i)
- rh.C0 = rh.C0:lerp(CFrame.new(1,.3,-.7) * CFrame.Angles(rad(20),rad(90),rad(0)),i)
- lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,-1.3) * CFrame.Angles(rad(-60),rad(-90),rad(0)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(-.2,.8,0) * CFrame.Angles(rad(160),rad(0),rad(-40)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(.2,.8,0) * CFrame.Angles(rad(160),rad(0),rad(40)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(90),rad(180),rad(0)),i)
- swait()
- end
- swait(5)
- attacc1 = false
- for i = 0,.5,.07 do
- rutj.C0 = rutj.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-150),rad(0),rad(180)),i)
- rh.C0 = rh.C0:lerp(CFrame.new(1,.8,-.5) * CFrame.Angles(rad(50),rad(90),rad(0)),i)
- lh.C0 = lh.C0:lerp(CFrame.new(-1,-.6,-1.3) * CFrame.Angles(rad(-30),rad(-90),rad(0)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(-.2,.4,-.5) * CFrame.Angles(rad(130),rad(0),rad(-30)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(.4,.4,-.5) * CFrame.Angles(rad(130),rad(0),rad(30)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(120),rad(180),rad(20)),i)
- swait()
- end
- swait(10)
- for i = 0,.5,.03 do
- rutj.C0 = rutj.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
- rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
- lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-90),rad(0),rad(0)),i)
- swait()
- end
- trail.Enabled = false
- rsw.Part1 = nil
- lsw.Part1 = nil
- using = false
- end
- function throw()
- rsw.Part1 = rapr
- lsw.Part1 = lapl
- using = true
- trail.Enabled = true
- for i = 0,.5,.02 do
- rutj.C0 = rutj.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(150)),i)
- rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
- lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-160),rad(0),rad(0)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(.2,-.1,0) * CFrame.Angles(rad(40),rad(0),rad(40)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-3,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
- swait()
- end
- for i = 0,.5,.05 do
- rutj.C0 = rutj.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
- rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
- lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-260),rad(0),rad(0)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(.2,-.1,0) * CFrame.Angles(rad(-10),rad(0),rad(-20)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-3,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
- swait()
- end
- fknife(mouse.Hit.p)
- trail.Enabled = false
- kn.Transparency = 1
- for i = 0,.5,.01 do
- rutj.C0 = rutj.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
- rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
- lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
- rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
- lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
- kw.C0 = kw.C0:lerp(CFrame.new(0,-1,0) * CFrame.Angles(rad(-90),rad(0),rad(0)),i)
- swait()
- end
- kn.Transparency = 0
- rsw.Part1 = nil
- lsw.Part1 = nil
- using = false
- end
- mouse.Button1Down:connect(function()
- if not using then
- swing()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "f" and not using then
- a()
- end
- if key == "r" and not using then
- suiAHH()
- end
- if key == "g" and not using then
- finish()
- end
- if key == "t" and not using then
- throw()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment