Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[-[CUBE OF POLARIS]-----
- This cube was Edit by Ericdesouza
- This cube was also TheHeadIessHorsemans first script on SB that was created with Sine and lerp
- KEYDOWNS:
- B = FREEZE MODE ( Slows )
- N = HEAL MODE
- M = DARKNESS MODE ( ACTIVATED T ABILITY )
- Q = SPINNING CUBE ( DMGS WITH FREEZE/HEALS WITH HEAL MODE )
- E = DISINERGRATE
- F = TELEPORT ( PRESS F OVER PLAYER AND CLICK LOCATION )
- T = BLACK HOLE ( DARNKESS )
- --[ ---------------- ]]----
- ----i didn't made the arrest em original script i just add the avatar.
- Character = game.Players.LocalPlayer.Character
- Player = game.Players.LocalPlayer
- char = Character
- hum = Character.Humanoid
- Torso = Character.Torso
- Head = Character.Head
- local s = Instance.new("Sound",char)
- char.Head.face.Texture = "rbxassetid://42070872"
- hum.MaxHealth = math.huge
- local s = Instance.new("Sound",char)
- s.SoundId = "http://www.roblox.com/asset/?id=869514342"
- s.Pitch = 1
- s.Volume = 2
- s.Looped = true
- wait(1)
- s:play()
- local Player = game:GetService("Players").LocalPlayer
- repeat wait(1) until Player.Character
- local Character = Player.Character
- local la = Character:FindFirstChild("Left Arm")
- local ra = Character:FindFirstChild("Right Arm")
- local ll = Character:FindFirstChild("Left Leg")
- local rl = Character:FindFirstChild("Right Leg")
- local Torso = Character:FindFirstChild("Torso")
- local Humanoid = Character:findFirstChild("Humanoid")
- Character.Animate:Destroy()
- Humanoid.Animator:Destroy()
- local p = game.Players.LocalPlayer
- local char = p.Character
- local mouse = p:GetMouse()
- local larm = char["Left Arm"]
- local rarm = char["Right Arm"]
- local TitanBet = ";"
- local lleg = char["Left Leg"]
- local rleg = char["Right Leg"]
- local hed = char.Head
- local torso = char.Torso
- local hum = char.Humanoid
- local cam = game.Workspace.CurrentCamera
- local root = char.HumanoidRootPart
- local deb = false
- local shot = 0
- local l = game:GetService("Lighting")
- local rs = game:GetService("RunService").RenderStepped
- local stanceToggle = "Normal"
- local Mana = Instance.new("IntValue", char)
- Mana.Value = 5000
- Mana.Name = "Mana"
- math.randomseed(os.time())
- hum.WalkSpeed = 50
- char.Health:Destroy()
- hum.MaxHealth = math.huge
- wait(0.1)
- hum.Health = math.huge
- ----------------------------------------------------
- local G = Instance.new("ScreenGui")
- G.Parent = p.PlayerGui
- G.Name = "Mana"
- local T = Instance.new("TextLabel")
- T.Name = "Mana"
- T.Parent = G
- T.Text = "Mana: "..char.Mana.Value
- T.FontSize = "Size24"
- T.BackgroundTransparency = 1
- T.TextColor3 = Color3.new(255,255,255)
- T.TextStrokeTransparency = 0
- T.Position = UDim2.new(0,250,0,400)
- T.BorderSizePixel = 0
- --//
- for i = 1,30 do
- Instance.new('Fire',larm); Instance.new('Fire',rarm)
- end
- --//
- Debounces = {
- on = false;
- ks = false;
- CanAttack = true;
- CanJoke = true;
- NoIdl = false;
- Slashing = false;
- Slashed = false;
- Grabbing = false;
- Grabbed = false;
- }
- local Touche = {char.Name, }
- ----------------------------------------------------
- function lerp(a, b, t) -- Linear interpolation
- return a + (b - a)*t
- end
- function slerp(a, b, t) --Spherical interpolation
- dot = a:Dot(b)
- if dot > 0.99999 or dot < -0.99999 then
- return t <= 0.5 and a or b
- else
- r = math.acos(dot)
- return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
- end
- end
- function matrixInterpolate(a, b, t)
- local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
- local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
- local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
- local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
- local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
- local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
- local t = v1:Dot(v2)
- if not (t < 0 or t == 0 or t > 0) then -- Failsafe
- return CFrame.new()
- end
- return CFrame.new(
- v0.x, v0.y, v0.z,
- v1.x, v1.y, v1.z,
- v2.x, v2.y, v2.z,
- v3.x, v3.y, v3.z)
- end
- ----------------------------------------------------//Mesh setting
- local cmeshes = {}
- local ll,rl,la,ra,t = Instance.new('CharacterMesh',char),Instance.new('CharacterMesh',char),Instance.new('CharacterMesh',char),Instance.new('CharacterMesh',char),Instance.new('CharacterMesh',char)
- ll.BodyPart = 'LeftLeg'
- rl.BodyPart = 'RightLeg'
- la.BodyPart = 'LeftArm'
- ra.BodyPart = 'RightArm'
- t.BodyPart = 'Torso'
- ll.MeshId,ll.OverlayTextureId,rl.MeshId,rl.OverlayTextureId = 68241558,18051314,68241677,18051314
- ra.MeshId,ra.OverlayTextureId,la.MeshId,la.OverlayTextureId = 68241658,18051314,68241543,18051314
- t.MeshId,t.OverlayTextureId=68241695,18051314
- local LimbAccess = {LA=true,RA=true,LL=true,RL=true,RJ=true,NJ=true,Ring=true}
- local State = "Normal"
- local Active = true
- local Mode = "Polaris"
- local mousepos = CFrame.new(0,0,0)
- function Lerp(a,b,i) -- A = First pos, B = Second Pos, i = Speed
- return a:lerp(b,i)
- end
- --Basically it works like this, a is the first position, and b is the position you want to reach. i is the slowness or smoothness factor.
- --They're usually labled x1,y1,alpha
- Left_Arm = Instance.new("Weld",Torso)
- Left_Arm.Part0 = Torso
- Left_Arm.Part1 = la
- Left_Arm.Name = "LeftArmJ"
- Left_Arm.C0 = CFrame.new(-1.5,0.5,0)
- Left_Arm.C1 = CFrame.new(0,0.5,0)
- Right_Arm = Instance.new("Weld",Torso)
- Right_Arm.Part0 = Torso
- Right_Arm.Part1 = ra
- Right_Arm.Name = "RightArmJ"
- Right_Arm.C0 = CFrame.new(1.5,0.5,0)
- Right_Arm.C1 = CFrame.new(0,0.5,0)
- Left_Leg = Instance.new("Weld",Torso)
- Left_Leg.Part0 = Torso
- Left_Leg.Part1 = ll
- Left_Leg.Name = "LeftLegJ"
- Left_Leg.C0 = CFrame.new(-0.5,-1,0)
- Left_Leg.C1 = CFrame.new(0,1,0)
- Right_Leg = Instance.new("Weld",Torso)
- Right_Leg.Name = "RightLegJ"
- Right_Leg.Part0 = Torso
- Right_Leg.Part1 = rl
- Right_Leg.C0 = CFrame.new(0.5,-1,0)
- Right_Leg.C1 = CFrame.new(0,1,0)
- local RootJoint = Instance.new("Weld",Character["HumanoidRootPart"])
- RootJoint.Name = "RootJ"
- RootJoint.Part0 = Character["HumanoidRootPart"]
- RootJoint.Part1 = Torso
- local NeckJ = Instance.new("Weld",Torso)
- NeckJ.Name = "NeckJ"
- NeckJ.Part0 = Torso
- NeckJ.Part1 = Character.Head
- NeckJ.C1 = CFrame.new(0,-1.5,0)
- local Model = Instance.new("Model",Character)
- Model.Name = "RingModel"
- local RingSize = Vector3.new(.8,.8,.8)
- local Ring = Instance.new("Part",Model)
- Ring.Name = "Ring"
- Ring.FormFactor = "Custom"
- Ring.Size = RingSize
- Ring.Anchored = true
- Ring.CanCollide = false
- Ring.BrickColor = BrickColor.new("White")
- Ring.Material = "Neon"
- Ring.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Ring.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Ring.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Ring.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Ring.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Ring.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- local RingClone = Ring:Clone()
- local Sphere = Instance.new("Part")
- Sphere.Shape = "Ball"
- Sphere.Name = "Bound"
- Sphere.Anchored = true
- Sphere.BrickColor = BrickColor.new("Really black")
- Sphere.Transparency = .8
- Sphere.Material = "Neon"
- function CreateRegion3FromLocAndSize(Position, Size)
- local SizeOffset = Size/2
- local Point1 = Position - SizeOffset
- local Point2 = Position + SizeOffset
- return Region3.new(Point1, Point2)
- end
- function ModeAccess(MODE)
- local Colors = {
- Freeze=BrickColor.new("Yellow");
- Polaris=BrickColor.new("Red");
- Hearth=BrickColor.new("White");
- Darkness=BrickColor.new("Really black");
- }
- local Mats = {
- Freeze = "Ice";
- Polaris = "Neon";
- Hearth="Neon";
- Darkness="Neon";
- }
- local Refl = {
- Freeze = .35;
- Polaris = 0;
- Hearth=0;
- Darkness=0;
- }
- LimbAccess.LL = false
- LimbAccess.LA = false
- LimbAccess.RA = false
- LimbAccess.RL = false
- LimbAccess.NJ = false
- LimbAccess.Ring = false
- LimbAccess.RJ = false
- Character.Humanoid.WalkSpeed = 0
- local angle = 0
- local angles = 1
- for i = 1,6,.1 do
- RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(0,0,0),.1)
- Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
- NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,.5,-1)*CFrame.Angles(math.rad(45),0,0),.25)
- Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,-1,0)*CFrame.Angles(0,0,math.rad(-2)),.1)
- Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,-1,0)*CFrame.Angles(0,0,math.rad(2)),.1)
- Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(-5),math.rad(0)),.03)
- Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.03)
- game:GetService("RunService").RenderStepped:wait()
- end
- for i = 1,6,.1 do
- angle = (angle % 100) + angles/10
- Ring.Size = Lerp(Ring.Size,Vector3.new(5,5,5),.04)
- Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
- Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(-5),math.rad(25)),.03)
- Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
- game:GetService("RunService").RenderStepped:wait()
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,1,.04 do
- Ring.Transparency = i
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- for i = 1,6,.1 do
- angle = (angle % 100) + angles/10
- Ring.Size = Lerp(Ring.Size,Vector3.new(0,0,0),.04)
- Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
- Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(5)),.03)
- Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.08)
- game:GetService("RunService").RenderStepped:wait()
- end
- coroutine.resume(coroutine.create(function()
- for i = 1,0,-.04 do
- Ring.Transparency = i
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- Ring.BrickColor = Colors[MODE]
- Ring.Material = Mats[MODE]
- Ring.Reflectance = Refl[MODE]
- for i = 1,6,.1 do
- angle = (angle % 100) + angles/10
- Ring.Size = Lerp(Ring.Size,Vector3.new(2,2,2),.04)
- Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
- Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(-5),math.rad(25)),.03)
- Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
- game:GetService("RunService").RenderStepped:wait()
- end
- Ring.Transparency = 0
- Mode = MODE
- LimbAccess.LL = true
- LimbAccess.LA = true
- LimbAccess.RA = true
- LimbAccess.RL = true
- LimbAccess.NJ = true
- LimbAccess.Ring = true
- LimbAccess.RJ = true
- end
- function Dmg(hit)
- local DB = false
- for i,v in ipairs(game.Workspace:FindPartsInRegion3(hit,nil,80)) do
- if v and v.Parent and v.Parent:FindFirstChild("Head") and v.Parent.Name ~= Player.Name then
- if v.Parent:FindFirstChild("Humanoid") and Mode == "Freeze" then
- v.Parent:FindFirstChild("Humanoid"):TakeDamage(v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
- elseif v.Parent:FindFirstChild("Humanoid") and Mode == "Hearth" then
- v.Parent:FindFirstChild("Humanoid").Health = v.Parent:FindFirstChild("Humanoid").Health + (v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
- end
- if v.Parent and DB == false then
- DB = true
- for index,object in pairs(v.Parent:GetChildren()) do
- if (object.ClassName == "Humanoid" and object.MaxHealth == math.huge) or (object.ClassName == "Humanoid" and object.ClassName ~= object.Name) then
- object:Destroy()
- break
- end
- end
- end
- if Mode == "Freeze" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("Body Colors") then
- v.Parent:FindFirstChild("Humanoid").WalkSpeed = 3
- local F = Instance.new("Folder",v.Parent)
- F.Name = "BCOLORS"
- v.Parent:FindFirstChild("Body Colors").Parent = F
- coroutine.resume(coroutine.create(function()
- wait(1)
- for i,v in pairs(v.Parent:GetChildren()) do
- if v:IsA("Part") then
- v.BrickColor = BrickColor.new("Red")
- end
- end
- end))
- end
- if Mode == "Polaris" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") then
- v.Parent:FindFirstChild("Humanoid").WalkSpeed = 16
- coroutine.resume(coroutine.create(function()
- wait(1)
- if v.Parent and v.Parent:FindFirstChild("BCOLORS") then
- v.Parent:FindFirstChild("BCOLORS")["Body Colors"].Parent = v.Parent
- v.Parent:FindFirstChild("BCOLORS"):Destroy()
- end
- end))
- end
- end
- end
- --[[if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= Player.Name then
- hit.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
- end]]--
- end
- Player:GetMouse().KeyDown:connect(function(key)
- local h=Player:GetMouse().Hit*CFrame.new(0,5,0)
- local a = 0
- local a2 = 0
- local as = .5
- local as2 = 600
- if key == "t" and Active == true and Mode == "Darkness" then
- Active = false
- LimbAccess.Ring = false
- for i = 0,6,.1 do
- Ring.CFrame = Lerp(Ring.CFrame,h,.1)
- game:GetService("RunService").RenderStepped:wait()
- end
- local news = Sphere:Clone()
- news.CanCollide = false
- repeat wait() until Character:FindFirstChild("RingModel")
- news.Parent = Character.RingModel
- news.Size = Vector3.new(100,100,100)
- news.CFrame = Ring.CFrame
- local CF = Ring.CFrame
- coroutine.resume(coroutine.create(function()
- for i = 0,40,.1 do
- a = (a % 100) + as/10
- a2 = (a2 % 100) + as/10
- Ring.Size = Lerp(Ring.Size,Vector3.new(3+math.sin(a2)*1,3+math.sin(a2)*1.5,3+math.sin(a2)*2),.1)
- Ring.CFrame = h*CFrame.Angles(a,0,a)
- news.Size = Lerp(news.Size,Vector3.new(100+math.sin(a2)*1,100+math.sin(a2)*1,100+math.sin(a2)*1),.1)
- news.CFrame = CF
- news.Transparency = .5+(math.sin(a)*.5)
- game:GetService("RunService").RenderStepped:wait()
- end
- end))
- for i = 1,40,.1 do
- for i,v in pairs(game.Players:GetChildren()) do
- if v and v:IsA("Player") and v.Character ~= nil and v.Character:FindFirstChild("Torso") then
- if v and v.Character and v.Character:FindFirstChild("Torso") and v.Name ~= Player.Name then
- if v and v.Character and v.Character.Torso and not v.Character.Torso:FindFirstChild("BOD") and (v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude < 50 then
- local V = Instance.new("BodyVelocity",v.Character.Torso)
- V.Name = "BOD"
- V.maxForce = Vector3.new(math.huge,math.huge,math.huge)
- end
- if v and v.Character and v.Character:FindFirstChild("Torso") and (v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude < 50 and v.Name ~= Player.Name then
- v.Character.Torso:FindFirstChild("BOD"). Velocity = CFrame.new(v.Character.Torso.CFrame.p,Ring.CFrame.p).lookVector*(v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude
- if v and v.Character and v.Character:FindFirstChild("Torso") and (v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude < 5 and v.Character:FindFirstChild("Humanoid") then
- v.Character:FindFirstChild("Humanoid").Health = v.Character:FindFirstChild("Humanoid").Health - (v.Character:FindFirstChild("Humanoid").MaxHealth*.006)
- end
- end
- end
- end
- end
- game:GetService("RunService").RenderStepped:wait()
- end
- for i,v in pairs(game.Players:GetChildren()) do
- if v and v:IsA("Player") and v.Character and v.Character:FindFirstChild("Torso") and v.Character.Torso:FindFirstChild("BOD") then
- v.Character.Torso:FindFirstChild("BOD"):Destroy()
- end
- end
- for i = news.Transparency,1,-.01 do
- news.Transparency = i
- game:GetService("RunService").RenderStepped:wait()
- end
- LimbAccess.Ring = true
- Active = true
- news:Destroy()
- end
- end)
- Player:GetMouse().KeyDown:connect(function(key)
- local angle = 0
- local anglespeed = 1
- if key == "q" and Active == true then
- Active = false
- LimbAccess.Ring = false
- local x,y,z = 50,50,50
- local pos = Player:GetMouse().Hit
- for i = 0,1,.01 do
- angle = (angle % 100) + anglespeed/10
- Ring.Size = Lerp(Ring.Size,Vector3.new(x,y,z),.05)
- Ring.CFrame = Ring.CFrame:lerp((CFrame.new(pos.p.x,pos.p.y,pos.p.z)*CFrame.new(0,y/2,0)*CFrame.Angles(0,angle,0)),i)
- game:GetService("RunService").RenderStepped:wait()
- end
- for i = 1,10,.1 do
- local reg = CreateRegion3FromLocAndSize(pos.p,Vector3.new(x,y,z))
- Dmg(reg,Mode)
- angle = (angle % 100) + anglespeed/10
- Ring.CFrame = CFrame.new(pos.p.x,pos.p.y,pos.p.z)*CFrame.new(0,y/2,0)*CFrame.Angles(0,angle,0)
- game:GetService("RunService").RenderStepped:wait()
- end
- LimbAccess.Ring = true
- wait(.5)
- Active = true
- end
- end)
- Player:GetMouse().KeyDown:connect(function(key)
- if key == "b" and Active == true then
- Active = false
- ModeAccess("Freeze")
- wait(1)
- Active = true
- Character.Humanoid.WalkSpeed = 16
- elseif key == "p" and Active == true then
- Active = false
- ModeAccess("Polaris")
- wait(1)
- Active = true
- Character.Humanoid.WalkSpeed = 16
- elseif key == "n" and Active == true then
- Active = false
- ModeAccess("Hearth")
- wait(1)
- Active = true
- Character.Humanoid.WalkSpeed = 16
- elseif key == "m" and Active == true then
- Active = false
- ModeAccess("Darkness")
- wait(1)
- Active = true
- Character.Humanoid.WalkSpeed = 16
- end
- end)
- Player:GetMouse().KeyDown:connect(function(key)
- local Object = Player:GetMouse().Target
- if key == "e" and Active == true and Object:IsA("Part") and Object.Name ~= "BasePlate" and Object.Name ~= "Baseplate" and Object.Name ~= "Base" then
- Active = false
- LimbAccess.Ring = false
- for i = 0,1,.01 do
- Ring.Size = Ring.Size:lerp(Object.Size+Vector3.new(.5,.5,.5),i)
- Ring.CFrame = Ring.CFrame:lerp(Object.CFrame,i)
- game:GetService("RunService").RenderStepped:wait()
- end
- for i = 0,.5,.01 do
- Ring.Size = Object.Size+Vector3.new(.5,.5,.5)
- Ring.CFrame = Object.CFrame
- game:GetService("RunService").RenderStepped:wait()
- end
- Object:Destroy()
- wait(.5)
- LimbAccess.Ring = true
- Active = true
- end
- end)
- Player:GetMouse().KeyDown:connect(function(key)
- local H = Player:GetMouse().Target
- if key == "f" and Active == true and H and H.Parent and H.Parent:FindFirstChild("Torso") then
- LimbAccess.Ring = false
- Active = false
- Ring.Anchored = true
- for i = 0,1,.01 do
- Ring.Size = Ring.Size:lerp(Vector3.new(4.5,6,2),i)
- Ring.CFrame = Ring.CFrame:lerp(H.Parent.Torso.CFrame,i)
- game:GetService("RunService").RenderStepped:wait()
- end
- Ring.Anchored = true
- H.Parent.Torso.Anchored = true
- for i = 0,1,.01 do
- Ring.CFrame = Ring.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
- Ring.CanCollide = false
- H.Parent.HumanoidRootPart.CFrame = H.Parent.HumanoidRootPart.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
- H.Parent.Torso.Velocity = Vector3.new(0,0,0)
- game:GetService("RunService").RenderStepped:wait()
- end
- H.Parent.Torso.Anchored = false
- Ring.Anchored = true
- LimbAccess.Ring = true
- H.Parent.Humanoid.WalkSpeed = 16
- wait(.7)
- Active = true
- end
- end)
- Player:GetMouse().Button1Down:connect(function()
- mousepos = Player:GetMouse().Hit
- end)
- angle = 0
- angle2 = 0
- angle3 = 0
- anglespeed = 2
- anglespeed2 = 1
- anglespeed3 = .4
- game:GetService("RunService").Stepped:connect(function()
- angle = ((angle % 100) + anglespeed/10)
- angle2 = ((angle2 % 100) + anglespeed2/10)
- angle3 = ((angle3 % 100) + anglespeed3/10) --it'll go from 0 to 100 and repeat in a loop. basically it will get to its destination and back --ok
- if Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude < 2 and State == "Normal" then -- idle
- if LimbAccess.RJ then
- RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.5,0,0)*CFrame.Angles(math.sin(angle3)*.02,math.rad(-45),0),.2)
- end
- if LimbAccess.LA then
- Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(97)+(math.sin(angle3))*-.05,0,math.rad(-25)),.1)
- end
- if LimbAccess.NJ then
- NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,0,0)*CFrame.Angles(math.sin(-angle3)*.04,math.rad(45)+(math.sin(-angle3)*.04),0),.25)
- end
- if LimbAccess.RA then
- Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(50)+(math.sin(angle3)*.1),math.rad(-20),math.rad(30)),.1)
- end
- if LimbAccess.LL then
- Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,-1,0)*CFrame.Angles(0,0,math.rad(-5)+math.sin(angle3)*.02),.1)
- end
- if LimbAccess.RL then
- Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,-1,0)*CFrame.Angles(0,0,math.rad(15)+math.sin(angle3)*-.02),.1)
- end
- if LimbAccess.Ring then
- Ring.CFrame = Lerp(Ring.CFrame,ra.CFrame*CFrame.new(0,-1.1+math.sin(angle2)*.2,-1)*CFrame.Angles(math.rad(40)+angle2,angle2,angle2),.04)
- Ring.Size = Lerp(Ring.Size,RingSize,.06)
- end
- elseif Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude > 2 and State == "Normal" then -- walk
- if LimbAccess.RJ then
- RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.2,math.sin(angle2)*.1,0)*CFrame.Angles(0,math.rad(45),0),.2)
- end
- if LimbAccess.LA then
- Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.2,0.35,0)*CFrame.Angles(math.rad(-25)+math.sin(angle3)*.06,0+math.sin(angle3)*.06,math.rad(15)+math.sin(angle3)*.06),.1)
- end
- if LimbAccess.NJ then
- NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,0,0)*CFrame.Angles(math.sin(-angle3)*.04,math.rad(-45)+(math.sin(-angle3)*.04),0),.25)
- end
- if LimbAccess.RA then
- Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(90)+math.sin(angle3)*.05,0,math.rad(40)),.1)
- end
- if LimbAccess.LL then
- Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,(math.sin(angle3)*.1)-.6,-.2)*CFrame.Angles(math.rad(-15)+(math.sin(angle3)*.1),0,math.rad(-5)),.1)
- end
- if LimbAccess.RL then
- Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,(math.sin(angle3)*.1)-.7,-.1)*CFrame.Angles(math.rad(-15)+(math.sin(angle3)*.1),0,math.rad(5)),.1)
- end
- if LimbAccess.Ring then
- local var = math.sin(angle2)*1
- Ring.Size = Lerp(Ring.Size,Vector3.new(2+var,2+var,2+var),.06)
- Ring.CFrame = Lerp(Ring.CFrame,CFrame.new((ra.CFrame*CFrame.new(0,-3,-.3)).p,Player:GetMouse().hit.p),.8)
- Ring.Velocity = Vector3.new(0,0,0)
- end
- end
- if not Character:FindFirstChild("RingModel") or not Character:FindFirstChild("RingModel"):FindFirstChild("Ring") then
- Mode = "Polaris"
- if Character:FindFirstChild("RingModel") then
- local NewRing = RingClone:Clone()
- Ring = NewRing
- Ring.Parent = Character:FindFirstChild("RingModel")
- else
- local Model = Instance.new("Model",Character)
- Model.Name = "RingModel"
- local NewRing = RingClone:Clone()
- Ring = NewRing
- Ring.Parent = Model
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement