Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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")
- local rp = RealPlayer
- script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp 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
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(b and "Button2Down" or "Button2Up")
- 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)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- p = game.Players.LocalPlayer
- char = p.Character
- pgui = p.PlayerGui
- Debounce = false
- local sin, cos, atan, rad, rand, rands = math.sin, math.cos, math.atan, math.rad, math.random, math.randomseed
- mouse= p:GetMouse()
- rarm = char["Right Arm"]
- larm = char["Left Arm"]
- rleg = char["Right Leg"]
- lleg = char["Left Leg"]
- local Euler = CFrame.fromEulerAnglesXYZ
- hed = char.Head
- torso = char.Torso
- root = char.HumanoidRootPart
- sinestep = 0
- melee = false
- smelee = false
- local sine, change = 0, 1
- local animpose = "Idle"
- local lastanimpose = "Idle"
- local sine = 0
- local change = 1
- local rs = game:service'RunService'
- local srs = rs.Stepped
- local animstop = false
- local animstopr = false
- local cf, ang, eu, v3 = CFrame.new, CFrame.Angles, CFrame.fromEulerAnglesXYZ, Vector3.new
- function clerp(c1,c2,al)
- local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
- local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
- for i,v in pairs(com1) do
- com1[i] = v+(com2[i]-v)*al
- end
- return cf(com1[1],com1[2],com1[3]) * ang(select(4,unpack(com1)))
- end
- srs:connect(function()
- sine = tick() * (change * 25)
- end)
- --Welds--
- newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
- local wld = Instance.new("Weld", wp1)
- wld.Part0 = wp0
- wld.Part1 = wp1
- wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
- end
- newWeld(torso, larm, -1.5, 0.5, 0)
- larm.Weld.C1 = CFrame.new(0, 0.5, 0)
- newWeld(torso, rarm, 1.5, 0.5, 0)
- rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
- newWeld(torso, hed, 0, 1.5, 0)
- newWeld(torso, lleg, -0.5, -1, 0)
- lleg.Weld.C1 = CFrame.new(0, 1, 0)
- newWeld(torso, rleg, 0.5, -1, 0)
- rleg.Weld.C1 = CFrame.new(0, 1, 0)
- newWeld(root, torso, 0, -1, 0)
- torso.Weld.C1 = CFrame.new(0, -1, 0)
- o1 = Instance.new("Part")
- o1.Parent = char
- o1.CanCollide = false
- o1.Shape = Enum.PartType.Ball
- o1.Size = Vector3.new(1.67000008, 1.67000008, 1.67000008)
- o1.BottomSurface = Enum.SurfaceType.Smooth
- o1.TopSurface = Enum.SurfaceType.Smooth
- newWeld(torso, o1, 0, -1, 0)
- o1.Weld.C1 = CFrame.new(0,-1,1.7)
- o1.BrickColor = BrickColor.new("New Yeller")
- o2 = Instance.new("Decal",o1)
- o2.Texture = "http://www.roblox.com/asset/?id=93815042"
- Knife = Instance.new("Part")
- Knim = Instance.new("SpecialMesh")
- Knife.Name = "Handle"
- Knife.Parent = game.Lighting
- Knife.CanCollide = false
- Knife.Anchored = false
- Knife.Material = Enum.Material.DiamondPlate
- Knife.BrickColor = BrickColor.new("Really black")
- Knife.Reflectance = 0.0099999997764826
- Knife.Elasticity = 0
- Knife.FormFactor = Enum.FormFactor.Custom
- Knife.Size = Vector3.new(0.400000006, 5, 0.800000012)
- Knife.BottomSurface = Enum.SurfaceType.Smooth
- Knife.TopSurface = Enum.SurfaceType.Smooth
- Knife.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Knim.Parent = Knife
- Knim.MeshId = "http://www.roblox.com/asset/?id=121944778 "
- Knim.TextureId = "http://www.roblox.com/asset/?id=162822166"
- Knim.MeshType = Enum.MeshType.FileMesh
- Inst = Instance.new
- BC = BrickColor.new
- Vec = Vector3.new
- Colour1 = "New Yeller"
- Cf = CFrame.new
- local function MakeWave()
- local Wave = Inst("Model", workspace)
- Wave.Name = "Wave"
- local WM = Inst("Part", Wave)
- WM.BrickColor = BC("New Yeller")
- WM.Material = "Neon"
- WM.Name = "WavePart"
- WM.Position = Vec(10.3, 7.6, -239.4)
- WM.Rotation = Vec(-180, 0, -180)
- WM.Anchored = true
- WM.CanCollide = false
- WM.Locked = true
- WM.Size = Vec(1, 2.4, 1)
- local W1 = Inst("Part", Wave)
- W1.BrickColor = BC(Colour1)
- W1.Material = "Neon"
- W1.Name = "WavePart"
- W1.Position = Vec(10.3, 9.648, -239.664)
- W1.Rotation = Vec(165, 0, -180)
- W1.Anchored = true
- W1.CanCollide = false
- W1.Locked = true
- W1.Size = Vec(1, 2.1, 1)
- local W2 = Inst("Part", Wave)
- W2.BrickColor = BC(Colour1)
- W2.Material = "Neon"
- W2.Name = "WavePart"
- W2.Position = Vec(10.3, 11.4, -240.4)
- W2.Rotation = Vec(150, 0, -180)
- W2.Anchored = true
- W2.CanCollide = false
- W2.Locked = true
- W2.Size = Vec(1, 2, 1)
- local W3 = Inst("Part", Wave)
- W3.BrickColor = BC(Colour1)
- W3.Material = "Neon"
- W3.Name = "WavePart"
- W3.Position = Vec(10.3, 5.552, -239.663)
- W3.Rotation = Vec(-165, 0, -180)
- W3.Anchored = true
- W3.CanCollide = false
- W3.Locked = true
- W3.Size = Vec(1, 2.1, 1)
- local W4 = Inst("Part", Wave)
- W4.BrickColor = BC(Colour1)
- W4.Material = "Neon"
- W4.Name = "WavePart"
- W4.Position = Vec(10.3, 3.8, -240.4)
- W4.Rotation = Vec(-150, 0, -180)
- W4.Anchored = true
- W4.CanCollide = false
- W4.Locked = true
- W4.Size = Vec(1, 2, 1)
- local WH = Inst("Part", Wave)
- WH.Transparency = 1
- WH.Name = "WaveHitbox"
- WH.Position = Vec(10.3, 7.6, -240.2)
- WH.Rotation = Vec(-180, 0, -180)
- WH.Anchored = true
- WH.CanCollide = false
- WH.Locked = true
- WH.Size = Vec(5, 12, 8)
- for _, w in pairs(Wave:GetChildren()) do
- if w:IsA("BasePart") and w ~= WH then
- local W = Inst("Weld", WH)
- W.Part0 = WH
- W.Part1 = w
- W.C0 = WH.CFrame:inverse() * Cf(WH.Position)
- W.C1 = w.CFrame:inverse() * Cf(WH.Position)
- local M = Inst("BlockMesh", w)
- M.Scale = Vec(0, 1, 1)
- end
- end
- local SiP = {NumberSequenceKeypoint.new(0, 1, 0), NumberSequenceKeypoint.new(1, .188, 0)}
- local TrP = {NumberSequenceKeypoint.new(0, 0, 0), NumberSequenceKeypoint.new(1, 1, 0)}
- local PE = Inst("ParticleEmitter", WH)
- PE.Color = ColorSequence.new(BC(Colour1).Color)
- PE.LightEmission = 1
- PE.Size = NumberSequence.new(SiP)
- PE.Transparency = NumberSequence.new(TrP)
- PE.EmissionDirection = "Back"
- PE.Lifetime = NumberRange.new(.2, .8)
- PE.Rate = 500
- PE.Rotation = NumberRange.new(60, 120)
- PE.RotSpeed = NumberRange.new(120, 360)
- PE.Speed = NumberRange.new(30)
- return Wave, WH
- end
- --Mouse Attack--
- hit1 = true
- hit2 = false
- hited = false
- attackdeb = false
- mouse.Button1Down:connect(function()
- if melee == false then
- if smelee == false then
- if Debounce == false then
- Debounce = true
- char.Humanoid.WalkSpeed = 0
- local Sound = Instance.new("Sound",o1)
- Sound.SoundId = "rbxassetid://138097010"
- Sound:Play()
- local Eff = Instance.new("Part",o1)
- Eff.Size = Vector3.new(3,3,3)
- Eff.CFrame = o1.CFrame
- Eff.CanCollide = false
- Eff.Anchored = true
- Eff.Transparency = 0.5
- Eff.Material = "Neon"
- Eff.BrickColor = BrickColor.new("Really red")
- for i = 1,100 do
- wait()
- Eff.CFrame = Eff.CFrame * CFrame.Angles(math.random(),math.random(),math.random())
- end
- local Beam = Instance.new("Part",o1)
- Beam.Size = Vector3.new(3,3,3)
- Beam.CFrame = torso.CFrame * CFrame.new(0,0,-2)
- Beam.CanCollide = false
- Beam.Anchored = true
- Beam.Transparency = 0.5
- Beam.Material = "Neon"
- Beam.BrickColor = BrickColor.new("Really red")
- local si = 0
- Sound.SoundId = 'rbxassetid://164826470'
- Sound:Play()
- for i = 1, 100 do
- si = si + 1
- Eff.CFrame = Eff.CFrame * CFrame.Angles(math.random(),math.random(),math.random())
- Beam.Size = Beam.Size + Vector3.new(0, 0, 4)
- Beam.Touched:connect(function(Hit)
- if Hit.Anchored == false and Hit.Parent ~= char then
- Hit:remove()
- end
- wait()
- end)
- Beam.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 0, -4 + -2 * si)
- wait()
- end
- for i = 1,6 do
- wait()
- Beam.Size = Beam.Size - Vector3.new(.5, 0, 0)
- end
- Beam:Destroy()
- Eff:Destroy()
- Sound:Destroy()
- char.Humanoid.WalkSpeed = 8
- Debounce = false
- end
- end
- end
- if melee == true then
- if Debounce == false then
- Debounce = true
- animstopr = true
- for i=1,10 do
- wait()
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.3,.5,0.5) * ang(rad(-120),rad(0),rad(-90)),0.3)
- end
- for i=1,6 do
- wait()
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0,0) * ang(rad(20),rad(0),rad(-90)),0.3)
- end
- local Wave, WHB = MakeWave()
- for _, p in pairs(Wave:GetChildren()) do
- if p:IsA("BasePart") then
- p.Anchored = false
- end
- end
- WHB.CFrame = root.CFrame * Euler(0, 0, rad(90))
- local Vel = Inst("BodyVelocity", WHB)
- Vel.MaxForce = Vec(math.huge, math.huge, math.huge)
- Vel.Velocity = WHB.CFrame.lookVector * 220
- local Gyr = Inst("BodyGyro", WHB)
- Gyr.CFrame = WHB.CFrame
- Gyr.MaxTorque = Vec(math.huge, math.huge, math.huge)
- local attack = false
- warn("Made by Owlv?")
- local list = {}
- local numFrags = 2
- math.randomseed(tick())
- WHB.Touched:connect(function(hit)
- if hit.Name ~= "Fragment" and hit.Name ~= "Base" and hit.Parent ~= char and hit.Parent.Parent ~= char then
- local sizeX = hit.Size.X/numFrags
- local sizeY = hit.Size.Y/numFrags
- local sizeZ = hit.Size.Z/numFrags
- local startX = (hit.Position.X - hit.Size.X/2) + sizeX/2
- local startY = (hit.Position.Y - hit.Size.Y/2) + sizeY/2
- local startZ = (hit.Position.Z - hit.Size.Z/2) + sizeZ/2
- for x=0,numFrags-1 do
- for y=0,numFrags-1 do
- for z=0,numFrags-1 do
- local part = Instance.new("Part")
- part.Size = Vector3.new(sizeX,sizeY,sizeZ)
- part.BrickColor = hit.BrickColor
- part.Material = hit.Material
- part.Transparency = hit.Transparency
- part.Reflectance = hit.Reflectance
- part.CanCollide = true
- part.CFrame = CFrame.new(startX+x*sizeX, startY+y*sizeY, startZ+z*sizeZ)
- part.Anchored = true
- table.insert(list, part)
- part.Name = "Fragment"
- part.Parent = hit.Parent
- end
- end
- end
- hit:Destroy()
- for i,v in pairs(list) do
- v.Anchored = false
- end
- end
- end)
- Debounce = false
- animstopr = false
- end
- end
- if smelee == true then
- if melee == false then
- if Debounce == false then
- Debounce = true
- animstopr = true
- attackdeb = true
- Knife.Touched:connect(function(hit)
- if attackdeb == false then
- local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if ehum ~= char.Humanoid and ehum ~= nil then
- attackdeb = true
- hit.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=93815042"
- local Head = hit.Parent:FindFirstChild("Head")
- local i
- local ch = hit.Parent:GetChildren()
- for i = 1,#ch do
- if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
- ch[i]:remove()
- end
- end
- local function Scan(ch)
- local e
- for e = 1,#ch do
- Scan(ch[e]:GetChildren())
- if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
- ch[e]:remove()
- end
- end
- end
- Scan(hit.Parent:GetChildren())
- if Head then
- Torso = hit.Parent.Torso
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.C1 = CFrame.new()
- Neck.Parent = Torso
- end
- local Limb = hit.Parent:FindFirstChild("Right Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = hit.Parent
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = hit.Parent:FindFirstChild("Left Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = hit.Parent
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = hit.Parent:FindFirstChild("Right Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = hit.Parent
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = hit.Parent:FindFirstChild("Left Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = hit.Parent
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- --[
- local Bar = Instance.new("Part")
- Bar.TopSurface = 0
- Bar.BottomSurface = 0
- Bar.formFactor = "Symmetric"
- Bar.Size = Vector3.new(1, 1, 1)
- Bar.Transparency = 1
- Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
- Bar.Parent = hit.Parent
- local Weld = Instance.new("Weld")
- Weld.Part0 = Torso
- Weld.Part1 = Bar
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = Torso
- --]]
- for i,v in pairs(hit.Parent:GetChildren()) do
- if v:IsA'Hat' or v:IsA'Shirt' or v:IsA'Pants' or v:IsA'Accessory' or v:IsA'CharacterMesh' then
- v:Destroy()
- end
- if v:IsA'Part' then
- if v.Name ~= 'Torso' and v.Name ~= 'Right Leg' and v.Name ~= 'Left Leg' then
- v.BrickColor = BrickColor.new("New Yeller")
- end
- if v.Name ~= 'Torso' and v.Name ~= 'Right Arm' and v.Name ~= 'Left Arm' and v.Name ~= 'Head' then
- v.BrickColor = BrickColor.new("Br. yellowish green")
- end
- if v.Name == 'Torso' then
- v.BrickColor = BrickColor.new("Bright blue")
- end
- end
- end
- end
- end
- end)
- if hit1 == true then
- for i=1,10 do
- wait()
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.3,.5,0.5) * ang(rad(-120),rad(0),rad(-90)),0.3)
- end
- for i=1,6 do
- wait()
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0,0) * ang(rad(20),rad(0),rad(-90)),0.3)
- end
- hited = true
- hit2 = true
- hit1 = false
- end
- if hit2 == true then
- if hited == false then
- for i=1,10 do
- wait()
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0,0) * ang(rad(20),rad(0),rad(-90)),0.3)
- end
- for i=1,6 do
- wait()
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.3,0.5,0.5) * ang(rad(-140),rad(0),rad(-90)),0.3)
- end
- hit1 = true
- hit2 = false
- end
- end
- Debounce = false
- animstopr = false
- hited = false
- attackdeb = false
- end
- end
- end
- end)
- --Knife/Sword Mode--
- once = false
- mouse.KeyDown:connect(function(key)
- if key == "b" then
- if smelee == false then
- if Debounce == false then
- Debounce = true
- if melee == false then
- o1.Anchored = true
- for i = 1,10 do
- wait()
- o1.Size = o1.Size - Vector3.new(0.1,0.1,0.1)
- end
- o1.Parent = game.Lighting
- Knife.Parent = rarm
- newWeld(rarm, Knife, 0, -1, 0)
- Knife.Weld.C1 = CFrame.new(0.2,-1,0) * CFrame.Angles(90,rad(0),rad(0))
- melee = true
- once = true
- end
- if melee == true then
- if once == false then
- o1.Parent = char
- Knife.Rotation = Vector3.new(0,0,0)
- Knife.Parent = game.Lighting
- o1.CFrame = torso.CFrame * CFrame.new(0,-1,-1.7)
- for i = 1,10 do
- wait()
- o1.Size = o1.Size + Vector3.new(0.1,0.1,0.1)
- end
- o1.Anchored = false
- newWeld(torso, o1, 0, -1, 0)
- o1.Weld.C1 = CFrame.new(0,-1,1.7)
- melee = false
- end
- end
- Debounce = false
- once = false
- end
- end
- end
- if key == 'x' then
- if melee == false then
- if smelee == false then
- if Debounce == false then
- once = true
- animstop = true
- Debounce = true
- o1.Weld:Destroy()
- root.Anchored = true
- newWeld(rarm, o1, 0, -1, 0)
- o1.Weld.C1 = CFrame.new(0,1,1)
- for i=1,6 do
- wait()
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0.3,0.2) * ang(rad(-150),rad(30),-rad(1)),0.3)
- end
- o1.Anchored = true
- o1.Weld:Destroy()
- local Spin = coroutine.create(function()
- for i =1,100 do
- wait()
- o1.CFrame = o1.CFrame * CFrame.Angles(math.random(),math.random(),math.random())
- end
- o1.Parent = game.Lighting
- Knife.Parent = rarm
- newWeld(rarm, Knife, 0, -1, 0)
- Knife.Weld.C1 = CFrame.new(0.2,-1.8,0) * CFrame.Angles(90,rad(0),rad(0))
- Knim.Scale = Vector3.new(1,2,1)
- smelee = true
- wait(0.5)
- animstop = false
- root.Anchored = false
- end)
- coroutine.resume(Spin)
- local pat = Instance.new("ParticleEmitter")
- pat.Parent = o1
- pat.Size = NumberSequence.new(0.40000000596046,0.40000000596046)
- pat.Texture = "rbxassetid://83563926"
- pat.Speed = NumberRange.new(0.89999997615814,0.89999997615814)
- local naeeym = Instance.new("BillboardGui",char)
- naeeym.Size = UDim2.new(0,100,0,40)
- naeeym.StudsOffset = Vector3.new(0,2,0)
- naeeym.Adornee = char.Head
- local tecks = Instance.new("TextLabel",naeeym)
- tecks.BackgroundTransparency = 1
- tecks.BorderSizePixel = 0
- tecks.Font = "Arial"
- tecks.FontSize = "Size36"
- tecks.TextStrokeTransparency = 0.5
- tecks.TextColor3 = Color3.new(255,255,0)
- tecks.Size = UDim2.new(1,0,0.5,0)
- tecks.Text = "S"
- wait(0.1)
- tecks.Text = "SU"
- wait(0.1)
- tecks.Text = "SUM"
- wait(0.1)
- tecks.Text = "SUMM"
- wait(0.1)
- tecks.Text = "SUMMO"
- wait(0.1)
- tecks.Text = "SUMMON"
- wait(0.1)
- tecks.Text = "SUMMON D"
- wait(0.1)
- tecks.Text = "SUMMON DE"
- wait(0.1)
- tecks.Text = "SUMMON DER"
- wait(0.1)
- tecks.Text = "SUMMON DERP"
- wait(0.1)
- tecks.Text = "SUMMON DERP S"
- wait(0.1)
- tecks.Text = "SUMMON DERP SW"
- wait(0.1)
- tecks.Text = "SUMMON DERP SWO"
- wait(0.1)
- tecks.Text = "SUMMON DERP SWOR"
- wait(0.1)
- tecks.Text = "SUMMON DERP SWORD"
- wait(1)
- naeeym:Destroy()
- for i = 1,10 do
- wait()
- o1.Size = o1.Size - Vector3.new(0.1,0.1,0.1)
- end
- Debounce = false
- pat:Destroy()
- end
- end
- if smelee == true then
- if Debounce == false then
- if once == false then
- Debounce = true
- o1.Parent = char
- Knife.Rotation = Vector3.new(0,0,0)
- Knife.Parent = game.Lighting
- Knim.Scale = Vector3.new(1,1,1)
- o1.CFrame = torso.CFrame * CFrame.new(0,-1,-1.7)
- for i = 1,10 do
- wait()
- o1.Size = o1.Size + Vector3.new(0.1,0.1,0.1)
- end
- o1.Anchored = false
- newWeld(torso, o1, 0, -1, 0)
- o1.Weld.C1 = CFrame.new(0,-1,1.7)
- smelee = false
- end
- end
- end
- end
- once = false
- Debounce = false
- end
- end)
- --Animation--
- char.Humanoid.WalkSpeed = 8
- srs:connect(function()
- if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
- animpose = "Idle"
- elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
- animpose = "Walking"
- end
- if animpose == "Walking" then
- if animstop == false then
- if melee == false then
- local animspd = .1
- rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(-rad(1)+-sin(sine/6)/2.2,-sin(sine/6)/13,rad(1)),animspd)
- lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(1)-sin(-sine/6)/2.2,sin(-sine/6)/13,-rad(1)),animspd)
- if animstopr == false then
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(.1,.6,.1) * ang(rad(-70)-sin(-sine/14)/14,rad(-15)+sin(-sine/18)/18,-rad(1)),animspd)
- end
- larm.Weld.C1 = clerp(larm.Weld.C1, cf(-.1,.6,.1) * ang(rad(-70)-sin(sine/14)/14,rad(15)+sin(sine/18)/18,-rad(1)),animspd)
- end
- end
- end
- if animpose == "Idle" then
- if animstop == false then
- if melee == false then
- local animspd = .1
- rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
- lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
- if animstopr == false then
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(.1,.6,.1) * ang(rad(-70)-sin(-sine/12)/13,rad(-15)+sin(-sine/18)/18,-rad(1)),animspd)
- end
- larm.Weld.C1 = clerp(larm.Weld.C1, cf(-.1,.6,.1) * ang(rad(-70)-sin(sine/12)/13,rad(15)+sin(sine/18)/18,-rad(0)),animspd)
- torso.Weld.C1 = clerp(torso.Weld.C1, cf(0,-1+cos(sine/10)/11,0),animspd)
- end
- end
- end
- if animpose == "Walking" then
- if animstop == false then
- if melee == true or smelee == true then
- local animspd = .1
- rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(-rad(1)+-sin(sine/6)/2.2,-sin(sine/6)/13,rad(1)),animspd)
- lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(1)-sin(-sine/6)/2.2,sin(-sine/6)/13,-rad(1)),animspd)
- if animstopr == false then
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(0,0.5,0) * ang(rad(0)-sin(-sine/5),rad(0)+sin(-sine/18)/18,-rad(1)),animspd)
- end
- larm.Weld.C1 = clerp(larm.Weld.C1, cf(0,0.5,0) * ang(rad(0)-sin(sine/5),rad(0)+sin(sine/18)/18,-rad(1)),animspd)
- end
- end
- end
- if animpose == "Idle" then
- if animstop == false then
- if melee == true or smelee == true then
- local animspd = .1
- rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
- lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
- if animstopr == false then
- rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(0,.5,0) * ang(rad(0)-sin(-sine/12)/13,rad(0)+sin(-sine/18)/18,-rad(1)),animspd)
- end
- larm.Weld.C1 = clerp(larm.Weld.C1, cf(0,.5,0) * ang(rad(0)-sin(sine/12)/13,rad(0)+sin(sine/18)/18,-rad(0)),animspd)
- torso.Weld.C1 = clerp(torso.Weld.C1, cf(0,-1+cos(sine/10)/11,0),animspd)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement