SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local lp = game.Players.LocalPlayer |
| 1 | + | game.Players.LocalPlayer.CameraMode = "Classic" |
| 2 | - | local chr = lp.Character |
| 2 | + | |
| 3 | - | local mouse = lp:GetMouse() |
| 3 | + | |
| 4 | - | local euler = CFrame.fromEulerAnglesXYZ |
| 4 | + | |
| 5 | - | local rad = math.rad |
| 5 | + | |
| 6 | - | local trso = chr.Torso |
| 6 | + | |
| 7 | - | |
| 7 | + | |
| 8 | - | local hd = Instance.new("Weld",chr.Head)
|
| 8 | + | |
| 9 | - | hd.Part0=chr.Head |
| 9 | + | human.MaxHealth = math.huge |
| 10 | - | hd.Part1=chr.Torso |
| 10 | + | |
| 11 | - | hd.C0=CFrame.new(0,-1.5,0) |
| 11 | + | |
| 12 | - | |
| 12 | + | human.Health = math.huge |
| 13 | - | |
| 13 | + | |
| 14 | - | hum = chr.Humanoid |
| 14 | + | local shieldlyboi = Instance.new("ForceField", c)
|
| 15 | - | |
| 15 | + | shieldlyboi.Visible = false |
| 16 | - | function Name(msg) |
| 16 | + | local s = game.Players.LocalPlayer.Character local Torso = s:WaitForChild("Torso")
|
| 17 | - | if chr.Head.Parent then |
| 17 | + | local CF, V3, Ang, pi, sqrt = CFrame.new, Vector3.new, CFrame.Angles, math.pi, math.sqrt |
| 18 | - | pcall(function() |
| 18 | + | s.Humanoid.WalkSpeed = 8 |
| 19 | - | local Gui = Instance.new('BillboardGui',chr.Head)
|
| 19 | + | local Body = s.HumanoidRootPart |
| 20 | - | Gui.ExtentsOffset = Vector3.new(0,2,0) |
| 20 | + | local Head = s.Head |
| 21 | - | Gui.Size = UDim2.new(0,200,0,300) |
| 21 | + | local TorsoWeld = Body.RootJoint |
| 22 | - | local Frame = Instance.new('Frame',Gui)
|
| 22 | + | local HeadWeld = s.Torso.Neck |
| 23 | - | Frame.BackgroundTransparency = 1 |
| 23 | + | local Mouse = game.Players.LocalPlayer:GetMouse() |
| 24 | - | Frame.Size = UDim2.new(1,0,1,0) |
| 24 | + | local Camera = game.Workspace.CurrentCamera |
| 25 | - | local Txt = Instance.new('TextLabel',Frame)
|
| 25 | + | local c = true |
| 26 | - | Txt.BackgroundTransparency = 1 |
| 26 | + | local Crouch = 0 |
| 27 | - | Txt.Size = UDim2.new(1,0,1,0) |
| 27 | + | local Crouching = false |
| 28 | - | Txt.Font = 'SourceSansItalic' |
| 28 | + | local SprintAmount = 0 |
| 29 | - | Txt.FontSize = 'Size24' |
| 29 | + | local Sprinting = false |
| 30 | - | Txt.Text = msg |
| 30 | + | local Lean = 0 |
| 31 | - | Txt.TextColor3 = BrickColor.new("Black").Color
|
| 31 | + | local Humanoid = s.Humanoid |
| 32 | - | Txt.TextStrokeColor3 = Color3.new(0/255,0/255,0/255) |
| 32 | + | function minmax(l, x, u) |
| 33 | - | Txt.TextStrokeTransparency = .5 |
| 33 | + | return math.max(l, math.min(x, u)) |
| 34 | - | Txt.TextWrapped = true |
| 34 | + | |
| 35 | - | Txt.TextScaled = false |
| 35 | + | function MakeWeld(Part0, Part1) |
| 36 | - | end) |
| 36 | + | local w = Instance.new("Weld", Part0)
|
| 37 | w.Part0, w.Part1 = Part0, Part1 | |
| 38 | return w | |
| 39 | end | |
| 40 | - | |
| 40 | + | function JointAction(Weld, AttachPoint, Point) |
| 41 | - | Name("Billy")
|
| 41 | + | local Part0Down = Weld.Part0.CFrame * AttachPoint * Ang(-pi/2, 0, 0) |
| 42 | - | |
| 42 | + | local ApplicDist = math.min(2, (Point - Part0Down.p).magnitude) |
| 43 | - | function Chat(msg) -- Credit to jillmiles1, kthxbye |
| 43 | + | local JointCFrame = Part0Down * CF(V3(), Part0Down:inverse() * Point) |
| 44 | - | if chr.Head.Parent then |
| 44 | + | local JointLine = Weld.Part0.CFrame:inverse() * JointCFrame * Ang(pi/2, 0, 0) |
| 45 | - | pcall(function() |
| 45 | + | Weld.C0 = JointLine * CF(0, -ApplicDist / 2, -sqrt(1 - ApplicDist^2 / 4)) |
| 46 | - | if chr.Head:FindFirstChild("Fazbear Chat Gui") then
|
| 46 | + | Weld.C1 = Ang(math.acos(ApplicDist / 2), 0, 0) |
| 47 | - | chr.Head['Fazbear Chat Gui']:destroy() |
| 47 | + | |
| 48 | - | end |
| 48 | + | function Smooth(Start, End, x) |
| 49 | - | local Gui = Instance.new('BillboardGui',chr.Head)
|
| 49 | + | return (3*x^2-2*x^3)*(End - Start) + Start |
| 50 | - | Gui.Name = "Fazbear Chat Gui" |
| 50 | + | |
| 51 | - | Gui.ExtentsOffset = Vector3.new(0,3,0) |
| 51 | + | Body.CanCollide = false |
| 52 | - | Gui.Size = UDim2.new(0,200,0,300) |
| 52 | + | TorsoWeld.C1 = CF(0, -1, 0) |
| 53 | - | local Frame = Instance.new('Frame',Gui)
|
| 53 | + | HeadWeld.C1 = CF(0, -0.5, 0) |
| 54 | - | Frame.BackgroundTransparency = 1 |
| 54 | + | function KeyPressed(Key) |
| 55 | - | Frame.Size = UDim2.new(1,0,1,0) |
| 55 | + | if Key == "c" then |
| 56 | - | local Txt = Instance.new('TextLabel',Frame)
|
| 56 | + | if not Crouching then |
| 57 | - | Txt.BackgroundTransparency = 1 |
| 57 | + | Sprinting = false |
| 58 | - | Txt.Size = UDim2.new(1,0,1,0) |
| 58 | + | Crouching = true |
| 59 | - | Txt.Font = 'SourceSansItalic' |
| 59 | + | local WalkSpeedStart = Humanoid.WalkSpeed |
| 60 | - | Txt.Name = "ChatGui" |
| 60 | + | local CrouchStart = Crouch |
| 61 | - | Txt.FontSize = 'Size24' |
| 61 | + | local SprintAmountStart = SprintAmount |
| 62 | - | Txt.Text = '' |
| 62 | + | for i = 0, 1, 1/10 do |
| 63 | - | Txt.TextColor3 = BrickColor.new("Navy Blue").Color
|
| 63 | + | wait(1/30) |
| 64 | - | Txt.TextStrokeColor3 = Color3.new(0/255,0/255,0/255) |
| 64 | + | Crouch = Smooth(CrouchStart, -1, i) |
| 65 | - | Txt.TextStrokeTransparency = .5 |
| 65 | + | SprintAmount = Smooth(SprintAmountStart, 0, i) |
| 66 | - | Txt.TextWrapped = true |
| 66 | + | Humanoid.WalkSpeed = Smooth(WalkSpeedStart, 4, i) |
| 67 | - | Txt.TextScaled = false |
| 67 | + | |
| 68 | - | delay(wait(),function() |
| 68 | + | |
| 69 | - | for v = 1, #msg do |
| 69 | + | Sprinting = false |
| 70 | - | Txt.Text=string.sub(msg,1,v) |
| 70 | + | Crouching = false |
| 71 | - | wait(.07) |
| 71 | + | local WalkSpeedStart = Humanoid.WalkSpeed |
| 72 | - | end; |
| 72 | + | local CrouchStart = Crouch |
| 73 | - | wait(1) |
| 73 | + | local SprintAmountStart = SprintAmount |
| 74 | - | for v = 1, #Txt.Text do |
| 74 | + | for i = 0, 1, 1/10 do |
| 75 | - | Txt.Text=string.sub(msg,-1,v) |
| 75 | + | wait(1/30) |
| 76 | - | wait(.05) |
| 76 | + | Crouch = Smooth(CrouchStart, 0, i) |
| 77 | - | end; |
| 77 | + | SprintAmount = Smooth(SprintAmountStart, 0, i) |
| 78 | - | Gui:remove() |
| 78 | + | Humanoid.WalkSpeed = Smooth(WalkSpeedStart, 8, i) |
| 79 | - | end) |
| 79 | + | |
| 80 | - | end) |
| 80 | + | |
| 81 | elseif Key == "0" then | |
| 82 | Sprinting = true | |
| 83 | Crouching = false | |
| 84 | - | |
| 84 | + | local WalkSpeedStart = Humanoid.WalkSpeed |
| 85 | - | function Name(msg) |
| 85 | + | local CrouchStart = Crouch |
| 86 | - | if chr.Head.Parent then |
| 86 | + | local SprintAmountStart = SprintAmount |
| 87 | - | pcall(function() |
| 87 | + | for i = 0, 1, 1/15 do |
| 88 | - | local Gui = Instance.new('BillboardGui',chr.Head)
|
| 88 | + | wait(1/30) |
| 89 | - | Gui.ExtentsOffset = Vector3.new(0,1.5,0) |
| 89 | + | Crouch = Smooth(CrouchStart, 0, i) |
| 90 | - | Gui.Size = UDim2.new(0,200,0,300) |
| 90 | + | SprintAmount = Smooth(SprintAmountStart, 1, i) |
| 91 | - | local Frame = Instance.new('Frame',Gui)
|
| 91 | + | Humanoid.WalkSpeed = Smooth(WalkSpeedStart, 22, i) |
| 92 | - | Frame.BackgroundTransparency = 1 |
| 92 | + | |
| 93 | - | Frame.Size = UDim2.new(1,0,1,0) |
| 93 | + | elseif Key == "q" then |
| 94 | - | local Txt = Instance.new('TextLabel',Frame)
|
| 94 | + | local Start = Lean |
| 95 | - | Txt.BackgroundTransparency = 1 |
| 95 | + | for i = 0, 1, 1/10 do |
| 96 | - | Txt.Size = UDim2.new(1,0,1,0) |
| 96 | + | wait(1/30) |
| 97 | - | Txt.Font = 'SourceSansItalic' |
| 97 | + | Lean = Smooth(Start, 1, i) |
| 98 | - | Txt.FontSize = 'Size24' |
| 98 | + | |
| 99 | - | Txt.Text = msg |
| 99 | + | elseif Key == "e" then |
| 100 | - | Txt.TextColor3 = BrickColor.new("Royal purple").Color
|
| 100 | + | local Start = Lean |
| 101 | - | Txt.TextStrokeColor3 = Color3.new(0/255,0/255,0/255) |
| 101 | + | for i = 0, 1, 1/10 do |
| 102 | - | Txt.TextStrokeTransparency = .5 |
| 102 | + | wait(1/30) |
| 103 | - | Txt.TextWrapped = true |
| 103 | + | Lean = Smooth(Start, -1, i) |
| 104 | - | Txt.TextScaled = false |
| 104 | + | |
| 105 | - | end) |
| 105 | + | elseif Key == "p" then |
| 106 | c = not c | |
| 107 | if c then | |
| 108 | game.Players.LocalPlayer.CameraMode = "LockFirstPerson" | |
| 109 | - | |
| 109 | + | |
| 110 | - | |
| 110 | + | game.Players.LocalPlayer.CameraMode = "Classic" |
| 111 | - | |
| 111 | + | |
| 112 | - | |
| 112 | + | |
| 113 | - | lp.Chatted:connect(function(msg) |
| 113 | + | |
| 114 | - | Chat(msg) |
| 114 | + | function KeyDepressed(Key) |
| 115 | - | end) |
| 115 | + | if Key == "0" then |
| 116 | - | |
| 116 | + | Sprinting = false |
| 117 | - | print("ayy.")
|
| 117 | + | local WalkSpeedStart = Humanoid.WalkSpeed |
| 118 | - | |
| 118 | + | local SprintAmountStart = SprintAmount |
| 119 | - | |
| 119 | + | for i = 0, 1, 1/15 do |
| 120 | - | local p = game.Players.LocalPlayer |
| 120 | + | wait(1/30) |
| 121 | - | local char = p.Character |
| 121 | + | SprintAmount = Smooth(SprintAmountStart, 0, i) |
| 122 | - | local mouse = p:GetMouse() |
| 122 | + | Humanoid.WalkSpeed = Smooth(WalkSpeedStart, 8, i) |
| 123 | - | local larm = char["Left Arm"] |
| 123 | + | |
| 124 | - | local rarm = char["Right Arm"] |
| 124 | + | elseif Key == "q" or Key == "e" then |
| 125 | - | local lleg = char["Left Leg"] |
| 125 | + | local Start = Lean |
| 126 | - | local rleg = char["Right Leg"] |
| 126 | + | for i = 0, 1, 1/10 do |
| 127 | - | local hed = char.Head |
| 127 | + | wait(1/30) |
| 128 | - | local torso = char.Torso |
| 128 | + | Lean = Smooth(Start, 0, i) |
| 129 | - | local hum = char.Humanoid |
| 129 | + | |
| 130 | - | function clerp(c1,c2,al) |
| 130 | + | |
| 131 | - | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
|
| 131 | + | |
| 132 | - | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
|
| 132 | + | Mouse.KeyDown:connect(KeyPressed) |
| 133 | - | for i,v in pairs(com1) do |
| 133 | + | Mouse.KeyUp:connect(KeyDepressed) |
| 134 | - | com1[i] = v+(com2[i]-v)*al |
| 134 | + | local LegWeld1, LegWeld2 = MakeWeld(Body, s["Right Leg"]), MakeWeld(Body, s["Left Leg"]) |
| 135 | local i = 0 | |
| 136 | - | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) |
| 136 | + | local SmoothVelocity, Raise = Vector3.new(1, 1, 1), 0 |
| 137 | local Sprint = 1 | |
| 138 | - | |
| 138 | + | while wait(1/30) do |
| 139 | - | plr = game:service'Players'.LocalPlayer |
| 139 | + | if not Humanoid.PlatformStand and not Humanoid.Sit then |
| 140 | - | char = plr.Character |
| 140 | + | LegWeld1.Parent = Body |
| 141 | - | mouse = plr:GetMouse() |
| 141 | + | LegWeld2.Parent = Body |
| 142 | - | humanoid = char:findFirstChild("Humanoid")
|
| 142 | + | if Body.Velocity.magnitude >= 1 then SmoothVelocity = (SmoothVelocity * 3 + Body.Velocity) / 4 Raise = Raise * 7/8 + 1/8 Sprint = (Body.Velocity.magnitude / 8 + 0.0001)^(3/4) else Raise = Raise * 7/8 end |
| 143 | - | torso = char:findFirstChild("Torso")
|
| 143 | + | local ti = (Body.CFrame - Body.CFrame.p):inverse() |
| 144 | - | head = char.Head |
| 144 | + | i = i + ((ti * Torso.Velocity) * V3(1, 0, 1)).magnitude/60/Sprint |
| 145 | - | ra = char:findFirstChild("Right Arm")
|
| 145 | + | JointAction(LegWeld1, CF(0.5, Crouch * 2/3 - 1, 0), (Body.CFrame * CF(0.5, Sprint * math.min(math.max(-0.1, Raise * math.cos(pi*i) / 3), 1/4) - 2.9, 0) + SmoothVelocity.unit * Sprint * math.sin(pi*i)).p) |
| 146 | - | la = char:findFirstChild("Left Arm")
|
| 146 | + | JointAction(LegWeld2, CF(-0.5, Crouch * 2/3 - 1, 0), (Body.CFrame * CF(-0.5, Sprint * math.min(math.max(-0.1, Raise * -math.cos(pi*i) / 3), 1/4) - 2.9, 0) + SmoothVelocity.unit * Sprint * -math.sin(pi*i)).p) |
| 147 | - | rl = char:findFirstChild("Right Leg")
|
| 147 | + | TorsoWeld.C0 = CF(0, Crouch - 1, 0) * Ang(Crouch*pi/8 + SprintAmount*pi*(ti*SmoothVelocity).unit.z/8, (Crouch - SprintAmount)*math.cos(pi*i)*pi / 16, -SprintAmount*pi*(ti*SmoothVelocity).unit.x/8 + Lean*pi/8) |
| 148 | - | ll = char:findFirstChild("Left Leg")
|
| 148 | + | HeadWeld.C0 = CF(0, 1, 0) * Ang(-Crouch*pi/8 - SprintAmount*pi*(ti*SmoothVelocity).unit.z/8, (SprintAmount - Crouch)*math.cos(pi*i)*pi / 16, SprintAmount*pi*(ti*SmoothVelocity).unit.x/8 + Lean*pi/8) |
| 149 | - | rs = torso:findFirstChild("Right Shoulder")
|
| 149 | + | if (Camera.CoordinateFrame.p - Head.CFrame.p).magnitude <= 3 then |
| 150 | - | ls = torso:findFirstChild("Left Shoulder")
|
| 150 | + | CameraLV = (Body.CFrame:inverse() * Camera.CoordinateFrame).lookVector |
| 151 | - | rh = torso:findFirstChild("Right Hip")
|
| 151 | + | Parse = (CameraLV + Vector3.new(0, 0, -1)).unit |
| 152 | - | lh = torso:findFirstChild("Left Hip")
|
| 152 | + | Parsex, Parsey, Parsez = CF(V3(), Parse):toEulerAnglesXYZ() |
| 153 | - | neck = torso:findFirstChild("Neck")
|
| 153 | + | TorsoWeld.C0 = TorsoWeld.C0 * Ang(minmax(-pi/6, Parsex, pi/6) / (1 + SprintAmount), minmax(-pi/6, Parsey, pi/6) / (1 + SprintAmount), 0) |
| 154 | - | rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
|
| 154 | + | HeadWeld.C0 = HeadWeld.C0 * Ang(minmax(-pi/3, Parsex, pi/3) / (1 + SprintAmount), minmax(-pi/3, Parsey, pi/3) / (1 + SprintAmount), 0) |
| 155 | - | animate = char:findFirstChild("Animate")
|
| 155 | + | -- TorsoWeld.C0 = TorsoWeld.C0 * Ang(Parsex, Parsey, 0) |
| 156 | - | if animate then |
| 156 | + | -- HeadWeld.C0 = HeadWeld.C0 * Ang(Parsex, Parsey, 0) |
| 157 | - | animate:Destroy() |
| 157 | + | |
| 158 | else | |
| 159 | TorsoWeld.C0 = CF(0, -1, 0) | |
| 160 | HeadWeld.C0 = CF(0, 1, 0) | |
| 161 | LegWeld1.Parent = nil | |
| 162 | LegWeld2.Parent = nil | |
| 163 | end | |
| 164 | end |