Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Welcome to old roblox?")
- forcefield = Instance.new("ForceField")
- forcefield.Visible = false
- forcefield.Parent = owner.Character
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- wait(0.1)
- 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)
- Torso = char.Torso
- 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
- for _,v in pairs (char:children()) do
- if v:IsA("Part") then v.CanCollide = true end
- end
- hum.Animator:Destroy()
- if char:FindFirstChild("Head") then
- if char.Head:FindFirstChild("face") ~= nil then
- face = char.Head:FindFirstChild("face")
- face.Texture = "rbxassetid://3248568733"
- face.Parent.Mesh.MeshType = "FileMesh"
- face.Parent.Mesh.MeshId = "rbxassetid://1068249467"
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "Accessory" or v.ClassName == "CharacterMesh" or v.ClassName == "Shirt Graphic" then
- v:Remove()
- end
- if v.ClassName == "BodyColors" then
- v.HeadColor = BrickColor.new("Bright yellow")
- v.LeftArmColor = BrickColor.new("Bright yellow")
- v.LeftLegColor = BrickColor.new("Br. yellowish green")
- v.RightArmColor = BrickColor.new("Bright yellow")
- v.RightLegColor = BrickColor.new("Br. yellowish green")
- v.TorsoColor = BrickColor.Random()
- local Shirt = Instance.new("Shirt",face.Parent.Parent)
- Shirt.ShirtTemplate = "rbxassetid://1110695025"
- local Pants = Instance.new("Pants",face.Parent.Parent)
- Pants.PantsTemplate = "rbxassetid://1110798365"
- local TShirt = Instance.new("ShirtGraphic",face.Parent.Parent)
- TShirt.Graphic = "rbxassetid://2650823790"
- local TorsMesh = Instance.new("CharacterMesh", face.Parent.Parent)
- TorsMesh.BodyPart = "Torso"
- TorsMesh.MeshId = 1112228624
- local RAMesh = Instance.new("CharacterMesh", face.Parent.Parent)
- RAMesh.BodyPart = "RightArm"
- RAMesh.MeshId = 1112244824
- local LAMesh = Instance.new("CharacterMesh", face.Parent.Parent)
- LAMesh.BodyPart = "LeftArm"
- LAMesh.MeshId = 1112256772
- local RLMesh = Instance.new("CharacterMesh", face.Parent.Parent)
- RLMesh.BodyPart = "RightLeg"
- RLMesh.MeshId = 1112267576
- local LLMesh = Instance.new("CharacterMesh", face.Parent.Parent)
- LLMesh.BodyPart = "LeftLeg"
- LLMesh.MeshId = 1112275294
- end
- if v.ClassName == "Part" then
- if v.Name == "Head" or v.Name == "FalseHead" then
- v.BrickColor = BrickColor.new("Bright yellow")
- else
- v.BrickColor = BrickColor.new("Bright yellow")
- end
- end
- end
- end
- hold = false
- slash = false
- while game:GetService("RunService").Heartbeat:Wait() do
- if normalanim then
- sine = sine + 1
- end
- if remote.Parent == char then
- remote.Name = "ReplicationEvent"
- else
- remote = Instance.new("RemoteEvent", char)
- end
- for i,v in pairs (char:GetChildren()) do
- if v:IsA("Tool") then
- hold = true
- for i,v in pairs (v:children()) do
- if v:IsA("StringValue") and v.Name == "toolanim" and v.Value == "Slash" then
- slash = true
- hold = true
- coroutine.wrap(function()
- slash = true
- wait(.15)
- slash = false
- end)()
- end
- end
- elseif not v:IsA("Tool") then
- hold = false
- end
- 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
- if hold == false then
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 0.2 * math.sin(sine / 28)), 0.6)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, 0.2 * math.sin(sine / 28)), 0.6)
- RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, -0.2 * math.sin(sine / 28)), 0.6)
- LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, -0.2 * math.sin(sine / 28)), 0.6)
- rootj.C0 = rootjnor * CFrame.new(0, 0, 0)
- elseif hold == true then
- if slash == false then
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.rad(90)), 0.7)
- LS.C0 = LSnor * CFrame.Angles(0, 0, 0)
- RH.C0 = RH.C0:Lerp(RHnor, 0.1) - Vector3.new(0, 0, 0)
- LH.C0 = LH.C0:Lerp(LHnor, 0.1) - Vector3.new(0, 0, 0)
- rootj.C0 = rootjnor * CFrame.new(0, 0, 0)
- elseif slash == true then
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 0), 0.7)
- LS.C0 = LSnor * CFrame.Angles(0, 0, 0)
- RH.C0 = RH.C0:Lerp(RHnor, 0.1) - Vector3.new(0, 0, 0)
- LH.C0 = LH.C0:Lerp(LHnor, 0.1) - Vector3.new(0, 0, 0)
- rootj.C0 = rootjnor * CFrame.new(0, 0, 0)
- end
- end
- elseif animpose == "Walking" and normalanim then
- if hold == false then
- RS.C0 = RSnor * CFrame.Angles(0, 0, -math.sin(sine / 8)), 0.1
- LS.C0 = LSnor * CFrame.Angles(0, 0, -math.sin(sine / 8)), 0.1
- RH.C0 = RHnor * CFrame.Angles(0, 0, math.sin(sine / 8)), 0.1
- LH.C0 = LHnor * CFrame.Angles(0, 0, math.sin(sine / 8)), 0.1
- rootj.C0 = rootjnor * CFrame.new(0, 0, 0)
- elseif hold == true then
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.rad(90)), 0.7)
- LS.C0 = LSnor * CFrame.Angles(0, 0, -math.sin(sine / 8)), 0.1
- RH.C0 = RHnor * CFrame.Angles(0, 0, math.sin(sine / 8)), 0.1
- LH.C0 = LHnor * CFrame.Angles(0, 0, math.sin(sine / 8)), 0.1
- rootj.C0 = rootjnor * CFrame.new(0, 0, 0)
- end
- elseif animpose == "Jumping" and normalanim then
- rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0, 0, 0), 0.15)
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 80 + 80), 0.15)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, 80 + 80), 0.15)
- RH.C0 = RH.C0:Lerp(RHnor, 0.15)
- LH.C0 = LH.C0:Lerp(LHnor, 0.15)
- elseif animpose == "Falling" and normalanim then
- rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0, 0, 0), 0.15)
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 80 + 80), 0.15)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, 80 + 80), 0.15)
- RH.C0 = RH.C0:Lerp(RHnor, 0.15)
- LH.C0 = LH.C0:Lerp(LHnor, 0.15)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement