Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local char = owner.Character
- char.Head.face.Transparency = 1
- char.Animate:Destroy()
- local mus = nil
- local hum = char:FindFirstChildOfClass("Humanoid")
- local idleanim = Instance.new("Animation")
- idleanim.Name = "Roblox Idle Animation"
- idleanim.AnimationId = "http://www.roblox.com/asset/?id=125750800"
- hum.WalkSpeed = 20
- mus = Instance.new("Sound",char.Torso)
- mus.SoundId = "rbxassetid://919231299"
- mus.Volume = 3
- mus.Looped = true
- mus:Play()
- mus.TimePosition = 55
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "CharacterMesh" or v.ClassName == "Shirt" or v.ClassName == "Pants" then
- v:Destroy()
- end
- if v.ClassName == "Part" or v.ClassName == "MeshPart" then
- v.Material = "Glass"
- end
- end
- wait(0.000000000001)
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Accessory" or v.ClassName == "Hat" then
- v.Handle.BrickColor = BrickColor.new("Really black")
- v.Handle.Material = "Glass"
- for i,s in pairs(v.Handle:GetChildren()) do
- if s.ClassName == "SpecialMesh" then
- s.TextureId = ""
- end
- end
- end
- end
- char["Body Colors"].HeadColor = BrickColor.new("Really black")
- char["Body Colors"].TorsoColor = BrickColor.new("Really black")
- char["Body Colors"].RightArmColor = BrickColor.new("Really black")
- char["Body Colors"].LeftArmColor = BrickColor.new("Really black")
- char["Body Colors"].RightLegColor = BrickColor.new("Really black")
- char["Body Colors"].LeftLegColor = BrickColor.new("Really black")
- --This script is made by Subaru112.
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local remote = Instance.new("RemoteEvent", char)
- remote.Name = "ReplicationEvent"
- local client = NLS([==[
- local mouse = game:GetService("Players").LocalPlayer:GetMouse()
- local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
- spawn(function()
- while game:GetService("RunService").Heartbeat:Wait() do
- remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
- end
- end)
- game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
- if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
- remote:FireServer(1, input.KeyCode)
- end
- end)
- mouse.Button1Down:Connect(function()
- remote:FireServer(2)
- end)
- remote.OnClientEvent:Connect(function()
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.Y, mouse.Hit.Position.Z))
- end)
- ]==], char)
- local RS = char.Torso["Right Shoulder"]
- local LS = char.Torso["Left Shoulder"]
- local RH = char.Torso["Right Hip"]
- local LH = char.Torso["Left Hip"]
- local rootj = char.HumanoidRootPart.RootJoint
- local throwbutton = false
- local throw = false
- local normalanim = true
- local attackd = false
- local animpose = "Idle"
- local timepos = 0
- local sine = 0
- local RSnor = RS.C0
- local LSnor = LS.C0
- local RHnor = RH.C0
- local LHnor = LH.C0
- local rootjnor = rootj.C0
- local swing = nil
- local swing2 = nil
- swing = false
- swing2 = false
- ---------------------------------
- --------------Set up-------------
- ---------------------------------
- function onTouched(fire)
- if not(fire.Parent == char) then
- if swing2 == true then
- if fire.Parent.ClassName == "Model" then
- local hum = fire.Parent:FindFirstChildOfClass("Humanoid")
- if hum then
- hum:Destroy()
- end
- for i,v in pairs(fire.Parent:GetChildren()) do
- if v.ClassName == "MeshPart" or v.ClassName == "Part" then
- local del = math.random(1,3)
- v.CanCollide = true
- v:MakeJoints()
- v.Anchored = false
- v.Parent = workspace
- v.Velocity = Vector3.new(0, 10, 0) + char.HumanoidRootPart.CFrame.LookVector * 70
- v.BrickColor = BrickColor.new("Really red")
- v.Transparency = 0
- v.Material = "Neon"
- for i,d in pairs(v:GetChildren()) do
- if d.ClassName == "Decal" or d.ClassName == "SpecialMesh" or d.ClassName == "BlockMesh" or d.ClassName == "FileMesh" then
- d:Destroy()
- end
- end
- end
- end
- end
- end
- end
- end
- char.Torso.Touched:connect(onTouched)
- function onTouched(fire2)
- if not(fire2.Parent == char) then
- if swing == true then
- if fire2.Parent.ClassName == "Model" then
- local hum = fire2.Parent:FindFirstChildOfClass("Humanoid")
- if hum then
- hum:Destroy()
- end
- for i,v in pairs(fire2.Parent:GetChildren()) do
- if v.ClassName == "MeshPart" or v.ClassName == "Part" then
- v.CanCollide = true
- v:BreakJoints()
- v.Anchored = false
- v.Parent = workspace
- v.Velocity = Vector3.new(0, 270, 0)
- v.BrickColor = BrickColor.new("White")
- v.Transparency = 0.8
- v.Material = "Neon"
- for i,d in pairs(v:GetChildren()) do
- if d.ClassName == "Decal" or d.ClassName == "SpecialMesh" or d.ClassName == "BlockMesh" or d.ClassName == "FileMesh" then
- d:Destroy()
- end
- end
- end
- end
- end
- end
- end
- end
- char.Torso.Touched:connect(onTouched)
- ---------------------------------
- -------------Attacks-------------
- ---------------------------------
- remote.OnServerEvent:Connect(function(Player, number, key)
- if number == 1 and plr.Name == Player.Name and attackd == false then
- if key == Enum.KeyCode.Z then
- if swing == false and swing2 == false then
- swing = true
- wait(0.5)
- swing = false
- end
- end
- if key == Enum.KeyCode.X then
- if swing2 == false and swing == false then
- swing2 = true
- wait(0.5)
- swing2 = false
- end
- end
- if key == Enum.KeyCode.C then
- swing = false
- swing2 = false
- end
- elseif Player.Name == plr.Name and number == 2 and throw == true and throwbutton == true then
- throwbutton = false
- throw = false
- end
- end)
- ---------------------------------
- -----------Wrapping up-----------
- ---------------------------------
- while game:GetService("RunService").Heartbeat:Wait() do
- if normalanim then
- sine = sine + 1
- end
- if mus.TimePosition > 83 then
- mus.TimePosition = 55
- end
- hum.Health = 9999999999999999
- mus.Volume = 3
- if not(mus.Parent == char.Torso) then
- mus = Instance.new("Sound",char.Torso)
- mus.SoundId = "rbxassetid://919231299"
- mus.Volume = 3
- mus.Looped = true
- mus:Play()
- mus.TimePosition = 50
- end
- if remote.Parent == char then
- remote.Name = "ReplicationEvent"
- else
- remote = Instance.new("RemoteEvent", char)
- end
- local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
- if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
- animpose = "Walking"
- elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
- animpose = "Jumping"
- elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
- animpose = "Falling"
- else
- animpose = "Idle"
- end
- if animpose == "Idle" and normalanim then
- char.Torso.Neck.C0 = char.Torso.Neck.C0:Lerp(char.Torso.Neck.C0 * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 2, 0)
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- elseif animpose == "Walking" and normalanim then
- char.Torso.Neck.C0 = char.Torso.Neck.C0:Lerp(char.Torso.Neck.C0 * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 2, 0)
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 3)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 3)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 3)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 3)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- elseif animpose == "Jumping" and normalanim then
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- elseif animpose == "Falling" and normalanim then
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 1)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 5, 0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement