Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Roblox.LUA | Ruby Golem. | Made by Cass.
- CN, CA, V3, BC, C3 = CFrame.new, CFrame.Angles, Vector3.new, BrickColor.new, Color3.new
- Ins, Abs, Sin, Cos, Rad, Pi = Instance.new, math.abs, math.sin, math.cos, math.rad, math.pi
- Floor, Ceil = math.floor, math.ceil
- NR, NS = NumberRange.new, NumberSequence.new
- Random = function(A)
- return ( math.random() - .5) * 2 * (A or 1)
- end
- Part = function(Parent, CFrame, Size, Colour, Material, Transparency, Anchored, CanCollide, Type)
- local P = Ins(Type or "Part")
- P.FormFactor = "Custom"
- P.Size = Size
- P.Anchored = Anchored
- P.Material = Material
- P.BrickColor = BC(Colour)
- P.Transparency = Transparency
- P.CanCollide = CanCollide
- P.TopSurface, P.BottomSurface, P.LeftSurface, P.RightSurface, P.FrontSurface, P.BackSurface = 10, 10, 10, 10, 10, 10
- P.CFrame = CFrame
- P.Parent = Parent
- P.Locked = true
- P:BreakJoints()
- return P
- end
- Weld = function(P0, P1, C0, C1)
- local W = Ins("Snap", P0)
- W.Part0 = P0
- W.Part1 = P1
- W.C0 = C0 or CN()
- W.C1 = C1 or CN()
- return W
- end
- function Lerp(A, B, Alpha)
- return (1-Alpha) * A + (Alpha * B)
- end
- New = function(Object, Parent, Data)
- local Object = Ins(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- return Object
- end
- function GetMass(Model)
- local Mass = 0
- for i, v in pairs(Model:children()) do
- if v:IsA("BasePart") then Mass = Mass + v:GetMass() end
- Mass = Mass + GetMass(v)
- end
- return Mass
- end
- function Raycast(Start, End, Ignore)
- return workspace:FindPartOnRayWithIgnoreList( Ray.new( Start, End.unit * End.magnitude ), Ignore )
- end
- Player = game:service("Players").LocalPlayer
- PlayerGui = Player:WaitForChild("PlayerGui")
- Mouse = Player:GetMouse()
- Util = assert(LoadLibrary("RbxUtility"))
- InputService = game:service("UserInputService")
- Character = Player.Character
- Torso = Character:WaitForChild("Torso")
- HRP = Character:WaitForChild("HumanoidRootPart")
- RA = Character:WaitForChild("Right Arm")
- LA = Character:WaitForChild("Left Arm")
- RL = Character:WaitForChild("Right Leg")
- LL = Character:WaitForChild("Left Leg")
- Head = Character:WaitForChild("Head")
- --ORS = Torso:WaitForChild("Right Shoulder")
- --OLS = Torso:WaitForChild("Left Shoulder")
- --ORH = Torso:WaitForChild("Right Hip")
- --OLH = Torso:WaitForChild("Left Hip")
- Humanoid = Character:WaitForChild("Humanoid")
- for i, v in pairs(Character:children()) do
- if v:IsA("CharacterAppearance") then
- pcall(game.Destroy, v)
- end
- if v:IsA("Accessory") then
- pcall(game.Destroy, v)
- end
- if v:IsA("Part") then
- v.Transparency = 1
- end
- if v.Name == "Head" and v:FindFirstChild("face") then
- pcall(game.Destroy, v:FindFirstChild("face"))
- end
- end
- C0 = {
- LS = CN(-1, 0.5, 0),
- RS = CN(1, 0.5, 0),
- LH = CN(-1, -1, 0),
- RH = CN(1, -1, 0),
- NK = CN(0, 1, 0),
- TW = CN(0, 0, 0),
- HW = CN(0, 0, 0),
- GTorso = CN(0, 1.4, 0),
- GNeck = CN(0, 1.125, 0),
- GLowerT = CN(0, -.9, 0),
- GLeftLegB = CN(-.3, -.4, 0),
- GLeftLegP1 = CN(0, -.3, 0),
- GLeftLegP2 = CN(0, -.3, 0),
- GLeftLegP3 = CN(0, -.3, 0),
- GLeftLegP4 = CN(0, -.3, 0),
- GLeftFoot = CN(0, -.3, -.0625),
- GRightLegB = CN(.3, -.4, 0),
- GRightLegP1 = CN(0, -.3, 0),
- GRightLegP2 = CN(0, -.3, 0),
- GRightLegP3 = CN(0, -.3, 0),
- GRightLegP4 = CN(0, -.3, 0),
- GRightFoot = CN(0, -.3, -.0625),
- GLeftArmB = CN(-1, .25, 0),
- GLeftArmP1 = CN(0, -.3, 0),
- GLeftArmP2 = CN(0, -.225, 0),
- GRightArmB = CN(1, .25, 0),
- GRightArmP1 = CN(0, -.3, 0),
- GRightArmP2 = CN(0, -.3, 0),
- GRightArmP3 = CN(0, -.3, 0),
- GRightArmP4 = CN(0, -.3, 0),
- GRightArmP5 = CN(0, -.3, 0),
- GRightArmP6 = CN(0, -.3, 0),
- GRightHand = CN(0, -.5, 0),
- }
- C1 = {
- LS = CN(0.5, 0.5, 0),
- RS = CN(-0.5, 0.5, 0),
- LH = CN(-.5, 1, 0),
- RH = CN(.5, 1, 0),
- NK = CN(0, -.5, 0),
- TW = CN(0, 0, 0),
- }
- Desired = {
- LS = C0.LS,
- RS = C0.RS,
- LH = C0.LH,
- RH = C0.RH,
- NK = C0.NK,
- TW = C0.TW,
- GTorso = CN(0, 1.4, 0),
- GNeck = CN(0, 1.125, 0),
- GLowerT = CN(0, -.9, 0),
- GLeftLegB = CN(-.3, -.4, 0),
- GLeftLegP1 = CN(0, -.3, 0),
- GLeftLegP2 = CN(0, -.3, 0),
- GLeftLegP3 = CN(0, -.3, 0),
- GLeftLegP4 = CN(0, -.3, 0),
- GLeftFoot = CN(0, -.3, -.0625),
- GRightLegB = CN(.3, -.4, 0),
- GRightLegP1 = CN(0, -.3, 0),
- GRightLegP2 = CN(0, -.3, 0),
- GRightLegP3 = CN(0, -.3, 0),
- GRightLegP4 = CN(0, -.3, 0),
- GRightFoot = CN(0, -.3, -.0625),
- GLeftArmB = CN(-1, .25, 0),
- GLeftArmP1 = CN(0, -.3, 0),
- GLeftArmP2 = CN(0, -.225, 0),
- GRightArmB = CN(1, .25, 0),
- GRightArmP1 = CN(0, -.3, 0),
- GRightArmP2 = CN(0, -.3, 0),
- GRightArmP3 = CN(0, -.3, 0),
- GRightArmP4 = CN(0, -.3, 0),
- GRightArmP5 = CN(0, -.3, 0),
- GRightArmP6 = CN(0, -.3, 0),
- GRightHand = CN(0, -.5, 0),
- }
- Speed = .2
- Count = 0
- CountTime = 40
- CountSpeed = .5
- Angle = 0
- Keysdown = { }
- Action = false
- Run = false
- Humanoid.Died:connect(function()
- end)
- GlowParts = { }
- Low, Full = 331, 1024
- LowOnPower = true
- function ChangeColor(On)
- for i, v in pairs(GlowParts) do
- v.BrickColor = BC(On and Full or Low)
- end
- end
- function TurnOn()
- for i, v in pairs(GlowParts) do
- end
- end
- pcall(game.Destroy, Character:FindFirstChild("Golem"))
- Model = New("Model", Character, { Name = "Golem" })
- GTorso = Part(Model, CN(), V3(2, 2, 1), "Grey", "Slate", 0, false, false)
- GTorsoW = Weld(Torso, GTorso, CN(0, 1.4, 0) * CA(0, 0, 0), CN(0, -1.4, 0))
- We1 = Part(Model, CN(), V3(1, .25, 1.5), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GTorso, We1, CN(-.75, 1.125, 0) * CA(0, Pi/2, 0))
- We2 = Part(Model, CN(), V3(1, .25, 1.5), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GTorso, We2, CN(.75, 1.125, 0) * CA(0, -Pi/2, 0))
- P1 = Part(Model, CN(), V3(.25, 1.25, 1), "Grey", "Slate", 0, false, false)
- Weld(GTorso, P1, CN(1.125, .375, 0) * CA(0, 0, 0))
- P2 = Part(Model, CN(), V3(.25, 1.25, 1), "Grey", "Slate", 0, false, false)
- Weld(GTorso, P2, CN(-1.125, .375, 0) * CA(0, 0, 0))
- We3 = Part(Model, CN(), V3(1, 1.25, .25), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GTorso, We3, CN(1.375, .375, 0) * CA(Pi, -Pi/2, 0))
- We4 = Part(Model, CN(), V3(1, .75, .25), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GTorso, We4, CN(1.125, -.625, 0) * CA(Pi, -Pi/2, 0))
- We5 = Part(Model, CN(), V3(1, 1.25, .25), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GTorso, We5, CN(-1.375, .375, 0) * CA(Pi, Pi/2, 0))
- We6 = Part(Model, CN(), V3(1, .75, .25), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GTorso, We6, CN(-1.125, -.625, 0) * CA(Pi, Pi/2, 0))
- G1 = Part(Model, CN(), V3(1, 0, .5), 313, "Grass", 0, false, false)
- New("BlockMesh", G1, {
- Scale = V3(1, .5, 1);
- })
- Weld(We1, G1, CA(-Pi/20, 0, 0) * CN(0, .05, 0))
- G2 = Part(Model, CN(), V3(.75, 0, .375), 313, "Grass", 0, false, false)
- New("BlockMesh", G2, {
- Scale = V3(1, .5, 1);
- })
- Weld(G1, G2, CN(.125, 0, -.4))
- G3 = Part(Model, CN(), V3(.75, 0, .2), 313, "Grass", 0, false, false)
- New("BlockMesh", G3, {
- Scale = V3(1, .5, 1);
- })
- Weld(G1, G3, CN(.0125, 0, -.675))
- G4 = Part(Model, CN(), V3(.75, 0, .4), 313, "Grass", 0, false, false)
- New("BlockMesh", G4, {
- Scale = V3(1, .5, 1);
- })
- Weld(G1, G4, CN(.0125, 0, .4))
- G5 = Part(Model, CN(), V3(1, 0, .2), 313, "Grass", 0, false, false)
- New("BlockMesh", G5, {
- Scale = V3(1, .5, 1);
- })
- Weld(G1, G5, CN(0, 0, .675))
- G6 = Part(Model, CN(), V3(1, 0, .5), 313, "Grass", 0, false, false)
- New("BlockMesh", G6, {
- Scale = V3(1, .5, 1);
- })
- Weld(We2, G6, CA(-Pi/20, 0, 0) * CN(0, .05, .5))
- G7 = Part(Model, CN(), V3(.75, 0, .375), 313, "Grass", 0, false, false)
- New("BlockMesh", G7, {
- Scale = V3(1, .5, 1);
- })
- Weld(G6, G7, CN(-.125, 0, -.4))
- G8 = Part(Model, CN(), V3(1, 0, .3), 313, "Grass", 0, false, false)
- New("BlockMesh", G8, {
- Scale = V3(1, .5, 1);
- })
- Weld(G6, G8, CN(0, 0, -.675))
- G9 = Part(Model, CN(), V3(.5, 0, .215), 313, "Grass", 0, false, false)
- New("BlockMesh", G9, {
- Scale = V3(1, .5, 1);
- })
- Weld(G6, G9, CN(0, 0, -.85))
- G10 = Part(Model, CN(), V3(.5, 0, .215), 313, "Grass", 0, false, false)
- New("BlockMesh", G10, {
- Scale = V3(1, .5, 1);
- })
- Weld(G6, G10, CN(-.125, 0, -1.05))
- G11 = Part(Model, CN(), V3(.75, 0, 0), 313, "Grass", 0, false, false)
- New("BlockMesh", G11, {
- Scale = V3(1, .5, .55);
- })
- Weld(G6, G11, CN(.125, 0, -1.2125))
- G12 = Part(Model, CN(), V3(0, .25, .4), 313, "Grass", 0, false, false)
- New("BlockMesh", G12, {
- Scale = V3(.4, 1, 1);
- })
- Weld(GTorso, G12, CN(-.75, 1.09, .475) * CA(0, Pi/2, 0))
- G13 = Part(Model, CN(), V3(0, 1, .2), 313, "Grass", 0, false, false)
- New("BlockMesh", G13, {
- Scale = V3(.4, 1, 1);
- })
- Weld(G12, G13, CN(0, -.5, 0) * CA(-Pi/30, 0, 0))
- G14 = Part(Model, CN(), V3(0, .25, .6), 313, "Grass", 0, false, false)
- New("BlockMesh", G14, {
- Scale = V3(.4, 1, 1);
- })
- Weld(GTorso, G14, CN(.75, 1.075, .475) * CA(0, Pi/2, 0))
- G15 = Part(Model, CN(), V3(0, 1.25, .0), 313, "Grass", 0, false, false)
- New("BlockMesh", G15, {
- Scale = V3(.4, 1, .75);
- })
- Weld(G14, G15, CN(0, -.725, 0) * CA(Pi/30, 0, 0))
- G16 = Part(Model, CN(), V3(0, .75, .0), 313, "Grass", 0, false, false)
- New("BlockMesh", G16, {
- Scale = V3(.4, 1, 1);
- })
- Weld(G14, G16, CN(0, -.2, -.25) * CA(0, 0, 0))
- G17 = Part(Model, CN(), V3(0, 1, 0), 313, "Grass", 0, false, false)
- New("BlockMesh", G17, {
- Scale = V3(.4, 1, .5);
- })
- Weld(GTorso, G17, CN(-.0125, .8, .475) * CA(0, Pi/2, 0))
- G18 = Part(Model, CN(), V3(0, .25, .75), 313, "Grass", 0, false, false)
- New("BlockMesh", G18, {
- Scale = V3(.4, 1, 1);
- })
- Weld(GTorso, G18, CN(.4, 1.11, -.475) * CA(0, Pi/2, 0))
- G19 = Part(Model, CN(), V3(0, .75, .0), 313, "Grass", 0, false, false)
- New("BlockMesh", G19, {
- Scale = V3(.4, 1, 1);
- })
- Weld(G18, G19, CN(0, -.2, -.25) * CA(0, 0, 0))
- G20 = Part(Model, CN(), V3(0, 1, 0), 313, "Grass", 0, false, false)
- New("BlockMesh", G20, {
- Scale = V3(.4, 1, .5);
- })
- Weld(GTorso, G20, CN(.5, .7, -.475) * CA(0, Pi/2, 0))
- G21 = Part(Model, CN(), V3(0, .6, .3), 313, "Grass", 0, false, false)
- New("BlockMesh", G21, {
- Scale = V3(.4, 1, .5);
- })
- Weld(GTorso, G21, CN(-.7, .9, -.475) * CA(0, Pi/2, 0))
- for i = 1, 12 do
- local P = Part(Model, CN(), V3(.325, 0, .2), "Light stone grey", "Slate", 0, false, false)
- Weld(GTorso, P, CN(0, 0, -.50 + ( i / 1000 )) * CA(Pi/2, 0, 0) * CA(0, Pi * 2 / 12 * i, 0) * CN(0, 0, -.5))
- local P0 = Part(Model, CN(), V3(.32, 0, .3), Low, "Neon", 0, false, false)
- Weld(GTorso, P0, CN(0, 0, -.49 + ( i / 1000 )) * CA(Pi/2, 0, 0) * CA(0, Pi * 2 / 12 * i, 0) * CN(0, 0, -.5))
- table.insert(GlowParts, P0)
- end
- GHead = Part(Model, CN(), V3(1.25, 1.25, 1.25), "Grey", "Slate", 0, false, false)
- GNeck = Weld(GTorso, GHead, CN(0, 1.125, 0) * CA(0, 0, 0), CN(0, -1.125, 0))
- BH = Part(Model, CN(), V3(1, 0, 1), Low, "Neon", 0, false, false)
- Weld(GHead, BH, CN(0, -.62, 0) * CA(0, 0, 0))
- table.insert(GlowParts, BH)
- GLowerT = Part(Model, CN(), V3(1.5, 1, 1), "Grey", "Slate", 0, false, false)
- GLowerTW = Weld(GTorso, GLowerT, CN(0, -.9, 0) * CA(0, 0, 0), CN(0, .9, 0))
- BH2 = Part(Model, CN(), V3(1.75, 0, .75), Low, "Neon", 0, false, false)
- Weld(GTorso, BH2, CN(0, -.995, 0) * CA(0, 0, 0))
- table.insert(GlowParts, BH2)
- BH3 = Part(Model, CN(), V3(1.75, 0, .75), Low, "Neon", 0, false, false)
- Weld(GLowerT, BH3, CN(0, .495, 0) * CA(0, 0, 0))
- table.insert(GlowParts, BH3)
- BH4 = Part(Model, CN(), V3(1.25, 0, .75), Low, "Neon", 0, false, false)
- Weld(GLowerT, BH4, CN(0, - .495, 0) * CA(0, 0, 0))
- table.insert(GlowParts, BH4)
- We7 = Part(Model, CN(), V3(1, 1, .25), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GLowerT, We7, CN(.875, 0, 0) * CA(Pi, -Pi/2, 0))
- We8 = Part(Model, CN(), V3(1, 1, .25), "Grey", "Slate", 0, false, false, "WedgePart")
- Weld(GLowerT, We8, CN(-.875, 0, 0) * CA(Pi, Pi/2, 0))
- GLeftLegB = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GLeftLegBW = Weld(GLowerT, GLeftLegB, CN(-.3, -.4, 0) * CA(0, 0, 0), CN(.3, .4, 0))
- GLeftLegP1 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GLeftLegP1W = Weld(GLeftLegB, GLeftLegP1, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GLeftLegP2 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GLeftLegP2W = Weld(GLeftLegP1, GLeftLegP2, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GLeftLegP3 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GLeftLegP3W = Weld(GLeftLegP2, GLeftLegP3, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GLeftLegP4 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GLeftLegP4W = Weld(GLeftLegP3, GLeftLegP4, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GLeftFoot = Part(Model, CN(), V3(1, .5, .75), "Grey", "Slate", 0, false, false)
- GLeftFootW = Weld(GLeftLegP4, GLeftFoot, CN(0, -.3, -.0625) * CA(0, 0, 0), CN(0, .3, .0625))
- GRightLegB = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightLegBW = Weld(GLowerT, GRightLegB, CN(.3, -.4, 0) * CA(0, 0, 0), CN(-.3, .4, 0))
- GRightLegP1 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightLegP1W = Weld(GRightLegB, GRightLegP1, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightLegP2 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightLegP2W = Weld(GRightLegP1, GRightLegP2, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightLegP3 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightLegP3W = Weld(GRightLegP2, GRightLegP3, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightLegP4 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightLegP4W = Weld(GRightLegP3, GRightLegP4, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightFoot = Part(Model, CN(), V3(1, .5, .75), "Grey", "Slate", 0, false, false)
- GRightFootW = Weld(GRightLegP4, GRightFoot, CN(0, -.3, -.0625) * CA(0, 0, 0), CN(0, .3, .0625))
- GLeftArmB = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GLeftArmBW = Weld(GTorso, GLeftArmB, CN(-1, .25, 0) * CA(0, 0, 0), CN(1, -.25, 0))
- GLeftArmP1 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GLeftArmP1W = Weld(GLeftArmB, GLeftArmP1, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GLeftArmP2 = Part(Model, CN(), V3(1, .25, .5), "Grey", "Slate", 0, false, false)
- GLeftArmP2W = Weld(GLeftArmP1, GLeftArmP2, CN(0, -.225, 0) * CA(0, 0, 0), CN(0, .225, 0))
- GLeftArmPA = Part(Model, CN(), V3(.75, 0, .5), "Grey", "Slate", 0, false, false)
- Weld(GLeftArmP2, GLeftArmPA, CN(.125, -.225, 0) * CA(0, 0, 0))
- GRightArmB = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightArmBW = Weld(GTorso, GRightArmB, CN(1, .25, 0) * CA(0, 0, 0), CN(-1, -.25, 0))
- GRightArmP1 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightArmP1W = Weld(GRightArmB, GRightArmP1, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightArmP2 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightArmP2W = Weld(GRightArmP1, GRightArmP2, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightArmP3 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightArmP3W = Weld(GRightArmP2, GRightArmP3, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightArmP4 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightArmP4W = Weld(GRightArmP3, GRightArmP4, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightArmP5 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightArmP5W = Weld(GRightArmP4, GRightArmP5, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightArmP6 = Part(Model, CN(), V3(1, .5, .5), "Grey", "Slate", 0, false, false)
- GRightArmP6W = Weld(GRightArmP5, GRightArmP6, CN(0, -.3, 0) * CA(0, 0, 0), CN(0, .3, 0))
- GRightHand = Part(Model, CN(), V3(1, 1.25, .5), "Grey", "Slate", 0, false, false)
- GRightHandW = Weld(GRightArmP6, GRightHand, CN(0, -.5, 0) * CA(0, 0, 0), CN(0, .5, 0))
- GThumb = Part(Model, CN(), V3(.3, .75, .3), "Grey", "Slate", 0, false, false)
- GThumbW = Weld(GRightHand, GThumb, CN(-.3, .125, 0) * CA(0, 0, 0), CN(.3, -.125, 0))
- --
- RS = Weld(Torso, RA, C0.RS, C1.RS)
- LS = Weld(Torso, LA, C0.LS, C1.LS)
- TW = Weld(HRP, Torso, C0.TW, C1.TW)
- NK = Weld(Torso, Head, C0.NK, C1.NK)
- LH = Weld(Torso, LL, C0.LH, C1.LH)
- RH = Weld(Torso, RL, C0.RH, C1.RH)
- function SetDesired(Table)
- --[[Desired.RS = Table.RS
- Desired.LS = Table.LS
- Desired.NK = Table.NK
- Desired.TW = Table.TW
- Desired.RH = Table.RH
- Desired.LH = Table.LH]]
- Desired.GTorso = Table.GTorso
- Desired.GNeck = Table.GNeck
- Desired.GLowerT = Table.GLowerT
- Desired.GLeftLegB = Table.GLeftLegB
- Desired.GLeftLegP1 = Table.GLeftLegP1
- Desired.GLeftLegP2 = Table.GLeftLegP2
- Desired.GLeftLegP3 = Table.GLeftLegP3
- Desired.GLeftLegP4 = Table.GLeftLegP4
- Desired.GLeftFoot = Table.GLeftFoot
- Desired.GRightLegB = Table.GRightLegB
- Desired.GRightLegP1 = Table.GRightLegP1
- Desired.GRightLegP2 = Table.GRightLegP2
- Desired.GRightLegP3 = Table.GRightLegP3
- Desired.GRightLegP4 = Table.GRightLegP4
- Desired.GRightFoot = Table.GRightFoot
- Desired.GLeftArmB = Table.GLeftArmB
- Desired.GLeftArmP1 = Table.GLeftArmP1
- Desired.GLeftArmP2 = Table.GLeftArmP2
- Desired.GRightArmB = Table.GRightArmB
- Desired.GRightArmP1 = Table.GRightArmP1
- Desired.GRightArmP2 = Table.GRightArmP2
- Desired.GRightArmP3 = Table.GRightArmP3
- Desired.GRightArmP4 = Table.GRightArmP4
- Desired.GRightArmP5 = Table.GRightArmP5
- Desired.GRightArmP6 = Table.GRightArmP6
- Desired.GRightHand = Table.GRightHand
- end
- game:service("RunService").Stepped:connect(function()
- if Keysdown[Enum.KeyCode.LeftShift] then
- Run = true
- else
- Run = false
- end
- Count = (Count % CountTime) + CountSpeed
- Angle = Pi * Sin((Pi * 2) / CountTime * Count)
- local Movement = HRP.Velocity
- local XZ = V3(Movement.X, 0, Movement.Z).magnitude
- local IsWalking = XZ > 2
- local Y = Movement.Y
- local Falling = Y > -25
- local Jump = Y > 0
- local PlatformCheck = Raycast(HRP.Position, V3(0, -6, 0), Character:children() )
- if not Action then
- local Swing = Rad(HRP.RotVelocity.Y) * 1
- if IsWalking and not Run and PlatformCheck then
- Humanoid.WalkSpeed = 4
- CountTime = 200
- CountSpeed = 2
- Speed = .05
- SetDesired({
- -- LS = C0.LS * CA(0, 0, 0) * CN(0, 0, 0) * CA(-Angle * .2, Angle * .075, 0),
- -- RS = C0.RS * CA(0, 0, 0) * CN(0, 0, 0) * CA(Angle * .2, Angle * .075, 0),
- -- LH = C0.LH * CA(-Pi/20 + Angle * .2, 0, 0) * CN(0, 0, -Angle * .075),
- -- RH = C0.RH * CA(-Pi/20 - Angle * .2, 0, 0) * CN(0, 0, Angle * .075),
- -- NK = C0.NK * CA(0, -Angle * .0125, 0),
- -- TW = C0.TW * CN(0, -.075 + Abs(Angle * .075), 0) * CA(0, Angle * .0125, 0),
- GTorso = CN(0, 1.4, 0) * CA (-Pi/40 - Abs(Angle * .05), Angle * .05, 0),
- GNeck = CN(0, .75 + Abs(Angle * .2), -.3) * CA(Pi/40 + Abs(Angle * .05), 0, 0),
- GLowerT = CN(0, -.9 - Abs(Angle * .1), 0) * CA(0, -Angle * .05, 0),
- GLeftLegB = CN(-.3, -.4 + math.max(Abs(Angle * .4), .4) - .8, 0) * CA(Pi/10 + math.min(math.max(Angle * .3, -.5), .6), 0, 0),
- GLeftLegP1 = CN(0, -.3, 0),
- GLeftLegP2 = CN(0, -.3, 0) * CA(-Abs(Angle * .2), 0, 0),
- GLeftLegP3 = CN(0, -.3, 0),
- GLeftLegP4 = CN(0, -.3, 0),
- GLeftFoot = CN(0, -.3, -.0625) * CA(Pi/10 - math.min(math.max(Angle * .3, -.3), .5), 0, 0),
- GRightLegB = CN(.3, -.4 - math.min(-Abs(Angle * .4), -.4) - .8, 0) * CA(Pi/10 - math.min(math.max(Angle * .3, -.5), .6), 0, 0),
- GRightLegP1 = CN(0, -.3, 0),
- GRightLegP2 = CN(0, -.3, 0) * CA(-Abs(Angle * .2), 0, 0),
- GRightLegP3 = CN(0, -.3, 0),
- GRightLegP4 = CN(0, -.3, 0),
- GRightFoot = CN(0, -.3, -.0625) * CA(Pi/10 + math.min(math.max(Angle * .3, -.5), .6), 0, 0),
- GLeftArmB = CN(-1, .25, 0) * CA(-Angle * .2, 0, 0),
- GLeftArmP1 = CN(0, -.3, 0),
- GLeftArmP2 = CN(0, -.225, 0),
- GRightArmB = CN(1, .25, 0) * CA(Angle * .2, 0, 0),
- GRightArmP1 = CN(0, -.3, 0),
- GRightArmP2 = CN(0, -.3, 0) * CA(Abs(Angle * .1), 0, 0),
- GRightArmP3 = CN(0, -.3, 0),
- GRightArmP4 = CN(0, -.3, 0) * CA(Abs(Angle * .025), 0, 0),
- GRightArmP5 = CN(0, -.3, 0),
- GRightArmP6 = CN(0, -.3, 0),
- GRightHand = CN(0, -.5, 0) * CA(Abs(Angle * .025), 0, 0),
- })
- elseif IsWalking and Run and PlatformCheck then
- Humanoid.WalkSpeed = 10
- CountTime = 40
- CountSpeed = 1.125
- Speed = .2
- SetDesired({
- -- LS = C0.LS * CA(0, 0, 0) * CN(0, 0, 0) * CA(-Angle * .2, Angle * .075, 0),
- -- RS = C0.RS * CA(0, 0, 0) * CN(0, 0, 0) * CA(Angle * .2, Angle * .075, 0),
- -- LH = C0.LH * CA(-Pi/20 + Angle * .2, 0, 0) * CN(0, 0, -Angle * .075),
- -- RH = C0.RH * CA(-Pi/20 - Angle * .2, 0, 0) * CN(0, 0, Angle * .075),
- -- NK = C0.NK * CA(0, -Angle * .0125, 0),
- -- TW = C0.TW * CN(0, -.075 + Abs(Angle * .075), 0) * CA(0, Angle * .0125, 0),
- GTorso = CN(0, 1.4, 0) * CA (0, 0, 0),
- GNeck = CN(0, 1.125, 0),
- GLowerT = CN(0, -.9, 0),
- GLeftLegB = CN(-.3, -.4, 0),
- GLeftLegP1 = CN(0, -.3, 0),
- GLeftLegP2 = CN(0, -.3, 0),
- GLeftLegP3 = CN(0, -.3, 0),
- GLeftLegP4 = CN(0, -.3, 0),
- GLeftFoot = CN(0, -.3, -.0625),
- GRightLegB = CN(.3, -.4, 0),
- GRightLegP1 = CN(0, -.3, 0),
- GRightLegP2 = CN(0, -.3, 0),
- GRightLegP3 = CN(0, -.3, 0),
- GRightLegP4 = CN(0, -.3, 0),
- GRightFoot = CN(0, -.3, -.0625),
- GLeftArmB = CN(-1, .25, 0),
- GLeftArmP1 = CN(0, -.3, 0),
- GLeftArmP2 = CN(0, -.225, 0),
- GRightArmB = CN(1, .25, 0),
- GRightArmP1 = CN(0, -.3, 0),
- GRightArmP2 = CN(0, -.3, 0),
- GRightArmP3 = CN(0, -.3, 0),
- GRightArmP4 = CN(0, -.3, 0),
- GRightArmP5 = CN(0, -.3, 0),
- GRightArmP6 = CN(0, -.3, 0),
- GRightHand = CN(0, -.5, 0),
- })
- elseif not IsWalking and PlatformCheck then
- CountTime = 200
- CountSpeed = 1
- Speed = .1
- SetDesired({
- -- LS = C0.LS * CA(0, 0, 0) * CN(0, 0, 0) * CA(-Angle * .2, Angle * .075, 0),
- -- RS = C0.RS * CA(0, 0, 0) * CN(0, 0, 0) * CA(Angle * .2, Angle * .075, 0),
- -- LH = C0.LH * CA(-Pi/20 + Angle * .2, 0, 0) * CN(0, 0, -Angle * .075),
- -- RH = C0.RH * CA(-Pi/20 - Angle * .2, 0, 0) * CN(0, 0, Angle * .075),
- -- NK = C0.NK * CA(0, -Angle * .0125, 0),
- -- TW = C0.TW * CN(0, -.075 + Abs(Angle * .075), 0) * CA(0, Angle * .0125, 0),
- GTorso = CN(0, 1.4 + (Angle * .01), 0) * CA (0, 0, 0),
- GNeck = CN(0, 1.125 + (Angle * .005), 0),
- GLowerT = CN(0, -.9 - (Angle * .01), 0),
- GLeftLegB = CN(-.3, -.4, 0),
- GLeftLegP1 = CN(0, -.3, 0),
- GLeftLegP2 = CN(0, -.3, 0),
- GLeftLegP3 = CN(0, -.3, 0),
- GLeftLegP4 = CN(0, -.3, 0),
- GLeftFoot = CN(0, -.3, -.0625),
- GRightLegB = CN(.3, -.4, 0),
- GRightLegP1 = CN(0, -.3, 0),
- GRightLegP2 = CN(0, -.3, 0),
- GRightLegP3 = CN(0, -.3, 0),
- GRightLegP4 = CN(0, -.3, 0),
- GRightFoot = CN(0, -.3, -.0625),
- GLeftArmB = CN(-1, .25 - (Angle * .005), 0),
- GLeftArmP1 = CN(0, -.3, 0),
- GLeftArmP2 = CN(0, -.225, 0),
- GRightArmB = CN(1, .25 - (Angle * .005), 0),
- GRightArmP1 = CN(0, -.3, 0),
- GRightArmP2 = CN(0, -.3, 0),
- GRightArmP3 = CN(0, -.3, 0),
- GRightArmP4 = CN(0, -.3, 0),
- GRightArmP5 = CN(0, -.3, 0),
- GRightArmP6 = CN(0, -.3, 0),
- GRightHand = CN(0, -.5, 0),
- })
- elseif not PlatformCheck and Jump then
- CountTime = 40
- CountSpeed = 1
- Speed = .2
- SetDesired({
- -- LS = C0.LS * CA(0, 0, 0) * CN(0, 0, 0) * CA(-Angle * .2, Angle * .075, 0),
- -- RS = C0.RS * CA(0, 0, 0) * CN(0, 0, 0) * CA(Angle * .2, Angle * .075, 0),
- -- LH = C0.LH * CA(-Pi/20 + Angle * .2, 0, 0) * CN(0, 0, -Angle * .075),
- -- RH = C0.RH * CA(-Pi/20 - Angle * .2, 0, 0) * CN(0, 0, Angle * .075),
- -- NK = C0.NK * CA(0, -Angle * .0125, 0),
- -- TW = C0.TW * CN(0, -.075 + Abs(Angle * .075), 0) * CA(0, Angle * .0125, 0),
- GTorso = CN(0, 1.4, 0) * CA (0, 0, 0),
- GNeck = CN(0, 1.125, 0),
- GLowerT = CN(0, -.9, 0),
- GLeftLegB = CN(-.3, -.4, 0),
- GLeftLegP1 = CN(0, -.3, 0),
- GLeftLegP2 = CN(0, -.3, 0),
- GLeftLegP3 = CN(0, -.3, 0),
- GLeftLegP4 = CN(0, -.3, 0),
- GLeftFoot = CN(0, -.3, -.0625),
- GRightLegB = CN(.3, -.4, 0),
- GRightLegP1 = CN(0, -.3, 0),
- GRightLegP2 = CN(0, -.3, 0),
- GRightLegP3 = CN(0, -.3, 0),
- GRightLegP4 = CN(0, -.3, 0),
- GRightFoot = CN(0, -.3, -.0625),
- GLeftArmB = CN(-1, .25, 0),
- GLeftArmP1 = CN(0, -.3, 0),
- GLeftArmP2 = CN(0, -.225, 0),
- GRightArmB = CN(1, .25, 0),
- GRightArmP1 = CN(0, -.3, 0),
- GRightArmP2 = CN(0, -.3, 0),
- GRightArmP3 = CN(0, -.3, 0),
- GRightArmP4 = CN(0, -.3, 0),
- GRightArmP5 = CN(0, -.3, 0),
- GRightArmP6 = CN(0, -.3, 0),
- GRightHand = CN(0, -.5, 0),
- })
- elseif not PlatformCheck and Falling then
- CountTime = 40
- CountSpeed = 1
- Speed = .2
- SetDesired({
- -- LS = C0.LS * CA(0, 0, 0) * CN(0, 0, 0) * CA(-Angle * .2, Angle * .075, 0),
- -- RS = C0.RS * CA(0, 0, 0) * CN(0, 0, 0) * CA(Angle * .2, Angle * .075, 0),
- -- LH = C0.LH * CA(-Pi/20 + Angle * .2, 0, 0) * CN(0, 0, -Angle * .075),
- -- RH = C0.RH * CA(-Pi/20 - Angle * .2, 0, 0) * CN(0, 0, Angle * .075),
- -- NK = C0.NK * CA(0, -Angle * .0125, 0),
- -- TW = C0.TW * CN(0, -.075 + Abs(Angle * .075), 0) * CA(0, Angle * .0125, 0),
- GTorso = CN(0, 1.4, 0) * CA (0, 0, 0),
- GNeck = CN(0, 1.125, 0),
- GLowerT = CN(0, -.9, 0),
- GLeftLegB = CN(-.3, -.4, 0),
- GLeftLegP1 = CN(0, -.3, 0),
- GLeftLegP2 = CN(0, -.3, 0),
- GLeftLegP3 = CN(0, -.3, 0),
- GLeftLegP4 = CN(0, -.3, 0),
- GLeftFoot = CN(0, -.3, -.0625),
- GRightLegB = CN(.3, -.4, 0),
- GRightLegP1 = CN(0, -.3, 0),
- GRightLegP2 = CN(0, -.3, 0),
- GRightLegP3 = CN(0, -.3, 0),
- GRightLegP4 = CN(0, -.3, 0),
- GRightFoot = CN(0, -.3, -.0625),
- GLeftArmB = CN(-1, .25, 0),
- GLeftArmP1 = CN(0, -.3, 0),
- GLeftArmP2 = CN(0, -.225, 0),
- GRightArmB = CN(1, .25, 0),
- GRightArmP1 = CN(0, -.3, 0),
- GRightArmP2 = CN(0, -.3, 0),
- GRightArmP3 = CN(0, -.3, 0),
- GRightArmP4 = CN(0, -.3, 0),
- GRightArmP5 = CN(0, -.3, 0),
- GRightArmP6 = CN(0, -.3, 0),
- GRightHand = CN(0, -.5, 0),
- })
- end
- end
- RS.C0 = RS.C0:lerp(Desired.RS, Speed)
- LS.C0 = LS.C0:lerp(Desired.LS, Speed)
- NK.C0 = NK.C0:lerp(Desired.NK, Speed)
- TW.C0 = TW.C0:lerp(Desired.TW, Speed)
- RH.C0 = RH.C0:lerp(Desired.RH, Speed)
- LH.C0 = LH.C0:lerp(Desired.LH, Speed)
- GTorsoW.C0 = GTorsoW.C0:lerp(Desired.GTorso, Speed)
- GNeck.C0 = GNeck.C0:lerp(Desired.GNeck, Speed)
- GLowerTW.C0 = GLowerTW.C0:lerp(Desired.GLowerT, Speed)
- GLeftLegBW.C0 = GLeftLegBW.C0:lerp(Desired.GLeftLegB, Speed)
- GLeftLegP1W.C0 = GLeftLegP1W.C0:lerp(Desired.GLeftLegP1, Speed)
- GLeftLegP2W.C0 = GLeftLegP2W.C0:lerp(Desired.GLeftLegP2, Speed)
- GLeftLegP3W.C0 = GLeftLegP3W.C0:lerp(Desired.GLeftLegP3, Speed)
- GLeftLegP4W.C0 = GLeftLegP4W.C0:lerp(Desired.GLeftLegP4, Speed)
- GLeftFootW.C0 = GLeftFootW.C0:lerp(Desired.GLeftFoot, Speed)
- GRightLegBW.C0 = GRightLegBW.C0:lerp(Desired.GRightLegB, Speed)
- GRightLegP1W.C0 = GRightLegP1W.C0:lerp(Desired.GRightLegP1, Speed)
- GRightLegP2W.C0 = GRightLegP2W.C0:lerp(Desired.GRightLegP2, Speed)
- GRightLegP3W.C0 = GRightLegP3W.C0:lerp(Desired.GRightLegP3, Speed)
- GRightLegP4W.C0 = GRightLegP4W.C0:lerp(Desired.GRightLegP4, Speed)
- GRightFootW.C0 = GRightFootW.C0:lerp(Desired.GRightFoot, Speed)
- GLeftArmBW.C0 = GLeftArmBW.C0:lerp(Desired.GLeftArmB, Speed)
- GLeftArmP1W.C0 = GLeftArmP1W.C0:lerp(Desired.GLeftArmP1, Speed)
- GLeftArmP2W.C0 = GLeftArmP2W.C0:lerp(Desired.GLeftArmP2, Speed)
- GRightArmBW.C0 = GRightArmBW.C0:lerp(Desired.GRightArmB, Speed)
- GRightArmP1W.C0 = GRightArmP1W.C0:lerp(Desired.GRightArmP1, Speed)
- GRightArmP2W.C0 = GRightArmP2W.C0:lerp(Desired.GRightArmP2, Speed)
- GRightArmP3W.C0 = GRightArmP3W.C0:lerp(Desired.GRightArmP3, Speed)
- GRightArmP4W.C0 = GRightArmP4W.C0:lerp(Desired.GRightArmP4, Speed)
- GRightArmP5W.C0 = GRightArmP5W.C0:lerp(Desired.GRightArmP5, Speed)
- GRightArmP6W.C0 = GRightArmP6W.C0:lerp(Desired.GRightArmP6, Speed)
- GRightHandW.C0 = GRightHandW.C0:lerp(Desired.GRightHand, Speed)
- end)
- InputService.InputBegan:connect(function(Input)
- if Input.UserInputType == Enum.UserInputType.Keyboard then
- local Key = Input.KeyCode
- Keysdown[Key] = true
- end
- end)
- InputService.InputEnded:connect(function(Input)
- if Input.UserInputType == Enum.UserInputType.Keyboard then
- local Key = Input.KeyCode
- Keysdown[Key] = false
- end
- end)
- workspace.h6IIow.Humanoid.MaxHealth=1000
- workspace.h6IIow.Humanoid.Health=102000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement