vallentganteng

time cube

Apr 21st, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.05 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6.  
  7. --[[-[CUBE OF POLARIS]-----
  8. This cube was created by TheHeadIessHorseman
  9. This cube was also TheHeadIessHorsemans first script on SB that was created with Sine and lerp
  10.  
  11. KEYDOWNS:
  12. B = FREEZE MODE ( Slows )
  13. N = HEAL MODE
  14. M = DARKNESS MODE ( ACTIVATED T ABILITY )
  15. Q = SPINNING CUBE ( DMGS WITH FREEZE/HEALS WITH HEAL MODE )
  16. E = DISINERGRATE
  17. F = TELEPORT ( PRESS F OVER PLAYER AND CLICK LOCATION )
  18. T = BLACK HOLE ( DARNKESS )
  19. --[ ---------------- ]]----
  20. local Player = game:GetService("Players").LocalPlayer
  21. repeat wait(1) until Player.Character
  22. local Character = Player.Character
  23. local la = Character:FindFirstChild("Left Arm")
  24. local ra = Character:FindFirstChild("Right Arm")
  25. local ll = Character:FindFirstChild("Left Leg")
  26. local rl = Character:FindFirstChild("Right Leg")
  27. local Torso = Character:FindFirstChild("Torso")
  28. local Humanoid = Character:findFirstChild("Humanoid")
  29. Character.Animate:Destroy()
  30. Humanoid.Animator:Destroy()
  31.  
  32. local LimbAccess = {LA=true,RA=true,LL=true,RL=true,RJ=true,NJ=true,Ring=true}
  33.  
  34. local State = "Normal"
  35. local Active = true
  36. local Mode = "Polaris"
  37. local mousepos = CFrame.new(0,0,0)
  38.  
  39. function Lerp(a,b,i) -- A = First pos, B = Second Pos, i = Speed
  40. return a:lerp(b,i)
  41. end
  42.  
  43. --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.
  44. --They're usually labled x1,y1,alpha
  45.  
  46. Left_Arm = Instance.new("Weld",Torso)
  47. Left_Arm.Part0 = Torso
  48. Left_Arm.Part1 = la
  49. Left_Arm.Name = "LeftArmJ"
  50. Left_Arm.C0 = CFrame.new(-1.5,0.5,0)
  51. Left_Arm.C1 = CFrame.new(0,0.5,0)
  52. Right_Arm = Instance.new("Weld",Torso)
  53. Right_Arm.Part0 = Torso
  54. Right_Arm.Part1 = ra
  55. Right_Arm.Name = "RightArmJ"
  56. Right_Arm.C0 = CFrame.new(1.5,0.5,0)
  57. Right_Arm.C1 = CFrame.new(0,0.5,0)
  58. Left_Leg = Instance.new("Weld",Torso)
  59. Left_Leg.Part0 = Torso
  60. Left_Leg.Part1 = ll
  61. Left_Leg.Name = "LeftLegJ"
  62. Left_Leg.C0 = CFrame.new(-0.5,-1,0)
  63. Left_Leg.C1 = CFrame.new(0,1,0)
  64. Right_Leg = Instance.new("Weld",Torso)
  65. Right_Leg.Name = "RightLegJ"
  66. Right_Leg.Part0 = Torso
  67. Right_Leg.Part1 = rl
  68. Right_Leg.C0 = CFrame.new(0.5,-1,0)
  69. Right_Leg.C1 = CFrame.new(0,1,0)
  70.  
  71. local RootJoint = Instance.new("Weld",Character["HumanoidRootPart"])
  72. RootJoint.Name = "RootJ"
  73. RootJoint.Part0 = Character["HumanoidRootPart"]
  74. RootJoint.Part1 = Torso
  75.  
  76. local NeckJ = Instance.new("Weld",Torso)
  77. NeckJ.Name = "NeckJ"
  78. NeckJ.Part0 = Torso
  79. NeckJ.Part1 = Character.Head
  80. NeckJ.C1 = CFrame.new(0,-1.5,0)
  81.  
  82. local Model = Instance.new("Model",Character)
  83. Model.Name = "RingModel"
  84. local RingSize = Vector3.new(.5,.5,.5)
  85. local Ring = Instance.new("Part",Model)
  86. Ring.Name = "Ring"
  87. Ring.FormFactor = "Custom"
  88. Ring.Size = RingSize
  89. Ring.Anchored = true
  90. Ring.CanCollide = false
  91. Ring.BrickColor = BrickColor.new("Bright orange")
  92. Ring.Material = "Neon"
  93. Ring.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  94. Ring.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  95. Ring.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  96. Ring.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  97. Ring.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  98. Ring.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  99.  
  100. local RingClone = Ring:Clone()
  101.  
  102. local Sphere = Instance.new("Part")
  103. Sphere.Shape = "Ball"
  104. Sphere.Name = "Bound"
  105. Sphere.Anchored = true
  106. Sphere.BrickColor = BrickColor.new("Really black")
  107. Sphere.Transparency = .8
  108. Sphere.Material = "Neon"
  109.  
  110. function CreateRegion3FromLocAndSize(Position, Size)
  111. local SizeOffset = Size/2
  112. local Point1 = Position - SizeOffset
  113. local Point2 = Position + SizeOffset
  114. return Region3.new(Point1, Point2)
  115. end
  116.  
  117. function ModeAccess(MODE)
  118. local Colors = {
  119. Freeze=BrickColor.new("Pastel light blue");
  120. Polaris=BrickColor.new("Bright orange");
  121. Hearth=BrickColor.new("Pastel brown");
  122. Darkness=BrickColor.new("Really black");
  123. }
  124. local Mats = {
  125. Freeze = "Ice";
  126. Polaris = "Neon";
  127. Hearth="Neon";
  128. Darkness="Neon";
  129. }
  130. local Refl = {
  131. Freeze = .35;
  132. Polaris = 0;
  133. Hearth=0;
  134. Darkness=0;
  135. }
  136. LimbAccess.LL = false
  137. LimbAccess.LA = false
  138. LimbAccess.RA = false
  139. LimbAccess.RL = false
  140. LimbAccess.NJ = false
  141. LimbAccess.Ring = false
  142. LimbAccess.RJ = false
  143. Character.Humanoid.WalkSpeed = 0
  144. local angle = 0
  145. local angles = 1
  146. for i = 1,6,.1 do
  147. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(0,0,0),.1)
  148. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  149. NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,.5,-1)*CFrame.Angles(math.rad(45),0,0),.25)
  150. Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,-1,0)*CFrame.Angles(0,0,math.rad(-2)),.1)
  151. Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,-1,0)*CFrame.Angles(0,0,math.rad(2)),.1)
  152. 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)
  153. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.03)
  154. game:GetService("RunService").RenderStepped:wait()
  155. end
  156. for i = 1,6,.1 do
  157. angle = (angle % 100) + angles/10
  158. Ring.Size = Lerp(Ring.Size,Vector3.new(5,5,5),.04)
  159. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  160. 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)
  161. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
  162. game:GetService("RunService").RenderStepped:wait()
  163. end
  164. coroutine.resume(coroutine.create(function()
  165. for i = 0,1,.04 do
  166. Ring.Transparency = i
  167. game:GetService("RunService").RenderStepped:wait()
  168. end
  169. end))
  170. for i = 1,6,.1 do
  171. angle = (angle % 100) + angles/10
  172. Ring.Size = Lerp(Ring.Size,Vector3.new(0,0,0),.04)
  173. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  174. 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)
  175. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.08)
  176. game:GetService("RunService").RenderStepped:wait()
  177. end
  178. coroutine.resume(coroutine.create(function()
  179. for i = 1,0,-.04 do
  180. Ring.Transparency = i
  181. game:GetService("RunService").RenderStepped:wait()
  182. end
  183. end))
  184. Ring.BrickColor = Colors[MODE]
  185. Ring.Material = Mats[MODE]
  186. Ring.Reflectance = Refl[MODE]
  187. for i = 1,6,.1 do
  188. angle = (angle % 100) + angles/10
  189. Ring.Size = Lerp(Ring.Size,Vector3.new(2,2,2),.04)
  190. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  191. 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)
  192. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
  193. game:GetService("RunService").RenderStepped:wait()
  194. end
  195. Ring.Transparency = 0
  196. Mode = MODE
  197. LimbAccess.LL = true
  198. LimbAccess.LA = true
  199. LimbAccess.RA = true
  200. LimbAccess.RL = true
  201. LimbAccess.NJ = true
  202. LimbAccess.Ring = true
  203. LimbAccess.RJ = true
  204. end
  205.  
  206. function Dmg(hit)
  207. local DB = false
  208.  
  209. for i,v in ipairs(game.Workspace:FindPartsInRegion3(hit,nil,80)) do
  210. if v and v.Parent and v.Parent:FindFirstChild("Head") and v.Parent.Name ~= Player.Name then
  211. if v.Parent:FindFirstChild("Humanoid") and Mode == "Freeze" then
  212. v.Parent:FindFirstChild("Humanoid"):TakeDamage(v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
  213. elseif v.Parent:FindFirstChild("Humanoid") and Mode == "Hearth" then
  214. v.Parent:FindFirstChild("Humanoid").Health = v.Parent:FindFirstChild("Humanoid").Health + (v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
  215. end
  216.  
  217. if v.Parent and DB == false then
  218. DB = true
  219. for index,object in pairs(v.Parent:GetChildren()) do
  220. if (object.ClassName == "Humanoid" and object.MaxHealth == math.huge) or (object.ClassName == "Humanoid" and object.ClassName ~= object.Name) then
  221. object:Destroy()
  222. break
  223. end
  224. end
  225. end
  226.  
  227. if Mode == "Freeze" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("Body Colors") then
  228. v.Parent:FindFirstChild("Humanoid").WalkSpeed = 3
  229. local F = Instance.new("Folder",v.Parent)
  230. F.Name = "BCOLORS"
  231.  
  232. v.Parent:FindFirstChild("Body Colors").Parent = F
  233. coroutine.resume(coroutine.create(function()
  234. wait(1)
  235. for i,v in pairs(v.Parent:GetChildren()) do
  236. if v:IsA("Part") then
  237. v.BrickColor = BrickColor.new("Pastel light blue")
  238. end
  239. end
  240. end))
  241. end
  242. if Mode == "Polaris" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") then
  243. v.Parent:FindFirstChild("Humanoid").WalkSpeed = 16
  244. coroutine.resume(coroutine.create(function()
  245. wait(1)
  246. if v.Parent and v.Parent:FindFirstChild("BCOLORS") then
  247. v.Parent:FindFirstChild("BCOLORS")["Body Colors"].Parent = v.Parent
  248. v.Parent:FindFirstChild("BCOLORS"):Destroy()
  249. end
  250. end))
  251. end
  252.  
  253. end
  254. end
  255. --[[if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= Player.Name then
  256. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
  257. end]]--
  258. end
  259. Player:GetMouse().KeyDown:connect(function(key)
  260. local h=Player:GetMouse().Hit*CFrame.new(0,5,0)
  261. local a = 0
  262. local a2 = 0
  263. local as = .5
  264. local as2 = 600
  265. if key == "t" and Active == true and Mode == "Darkness" then
  266. Active = false
  267. LimbAccess.Ring = false
  268. for i = 0,6,.1 do
  269. Ring.CFrame = Lerp(Ring.CFrame,h,.1)
  270. game:GetService("RunService").RenderStepped:wait()
  271. end
  272. local news = Sphere:Clone()
  273. news.CanCollide = false
  274. repeat wait() until Character:FindFirstChild("RingModel")
  275. news.Parent = Character.RingModel
  276. news.Size = Vector3.new(100,100,100)
  277. news.CFrame = Ring.CFrame
  278. local CF = Ring.CFrame
  279. coroutine.resume(coroutine.create(function()
  280. for i = 0,40,.1 do
  281. a = (a % 100) + as/10
  282. a2 = (a2 % 100) + as/10
  283. Ring.Size = Lerp(Ring.Size,Vector3.new(3+math.sin(a2)*1,3+math.sin(a2)*1.5,3+math.sin(a2)*2),.1)
  284. Ring.CFrame = h*CFrame.Angles(a,0,a)
  285. news.Size = Lerp(news.Size,Vector3.new(100+math.sin(a2)*1,100+math.sin(a2)*1,100+math.sin(a2)*1),.1)
  286. news.CFrame = CF
  287. news.Transparency = .5+(math.sin(a)*.5)
  288. game:GetService("RunService").RenderStepped:wait()
  289. end
  290. end))
  291. for i = 1,40,.1 do
  292. for i,v in pairs(game.Players:GetChildren()) do
  293. if v and v:IsA("Player") and v.Character ~= nil and v.Character:FindFirstChild("Torso") then
  294. if v and v.Character and v.Character:FindFirstChild("Torso") and v.Name ~= Player.Name then
  295. 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
  296. local V = Instance.new("BodyVelocity",v.Character.Torso)
  297. V.Name = "BOD"
  298. V.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  299. end
  300. 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
  301. 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
  302. 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
  303. v.Character:FindFirstChild("Humanoid").Health = v.Character:FindFirstChild("Humanoid").Health - (v.Character:FindFirstChild("Humanoid").MaxHealth*.006)
  304. end
  305. end
  306. end
  307. end
  308. end
  309. game:GetService("RunService").RenderStepped:wait()
  310. end
  311. for i,v in pairs(game.Players:GetChildren()) do
  312. if v and v:IsA("Player") and v.Character and v.Character:FindFirstChild("Torso") and v.Character.Torso:FindFirstChild("BOD") then
  313. v.Character.Torso:FindFirstChild("BOD"):Destroy()
  314. end
  315. end
  316. for i = news.Transparency,1,-.01 do
  317. news.Transparency = i
  318. game:GetService("RunService").RenderStepped:wait()
  319. end
  320. LimbAccess.Ring = true
  321. Active = true
  322. news:Destroy()
  323. end
  324. end)
  325. Player:GetMouse().KeyDown:connect(function(key)
  326. local angle = 0
  327. local anglespeed = 1
  328. if key == "q" and Active == true then
  329. Active = false
  330. LimbAccess.Ring = false
  331. local x,y,z = 50,50,50
  332. local pos = Player:GetMouse().Hit
  333. for i = 0,1,.01 do
  334. angle = (angle % 100) + anglespeed/10
  335. Ring.Size = Lerp(Ring.Size,Vector3.new(x,y,z),.05)
  336. 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)
  337. game:GetService("RunService").RenderStepped:wait()
  338. end
  339. for i = 1,10,.1 do
  340. local reg = CreateRegion3FromLocAndSize(pos.p,Vector3.new(x,y,z))
  341. Dmg(reg,Mode)
  342.  
  343. angle = (angle % 100) + anglespeed/10
  344. Ring.CFrame = CFrame.new(pos.p.x,pos.p.y,pos.p.z)*CFrame.new(0,y/2,0)*CFrame.Angles(0,angle,0)
  345. game:GetService("RunService").RenderStepped:wait()
  346. end
  347. LimbAccess.Ring = true
  348. wait(.5)
  349. Active = true
  350. end
  351. end)
  352. Player:GetMouse().KeyDown:connect(function(key)
  353.  
  354. if key == "b" and Active == true then
  355. Active = false
  356. ModeAccess("Freeze")
  357. wait(1)
  358. Active = true
  359. Character.Humanoid.WalkSpeed = 16
  360. elseif key == "p" and Active == true then
  361. Active = false
  362. ModeAccess("Polaris")
  363. wait(1)
  364. Active = true
  365. Character.Humanoid.WalkSpeed = 16
  366. elseif key == "n" and Active == true then
  367. Active = false
  368. ModeAccess("Hearth")
  369. wait(1)
  370. Active = true
  371. Character.Humanoid.WalkSpeed = 16
  372. elseif key == "m" and Active == true then
  373. Active = false
  374. ModeAccess("Darkness")
  375. wait(1)
  376. Active = true
  377. Character.Humanoid.WalkSpeed = 16
  378. end
  379. end)
  380.  
  381. Player:GetMouse().KeyDown:connect(function(key)
  382. local Object = Player:GetMouse().Target
  383. if key == "e" and Active == true and Object:IsA("Part") and Object.Name ~= "BasePlate" and Object.Name ~= "Baseplate" and Object.Name ~= "Base" then
  384. Active = false
  385. LimbAccess.Ring = false
  386. for i = 0,1,.01 do
  387. Ring.Size = Ring.Size:lerp(Object.Size+Vector3.new(.5,.5,.5),i)
  388. Ring.CFrame = Ring.CFrame:lerp(Object.CFrame,i)
  389. game:GetService("RunService").RenderStepped:wait()
  390. end
  391. for i = 0,.5,.01 do
  392. Ring.Size = Object.Size+Vector3.new(.5,.5,.5)
  393. Ring.CFrame = Object.CFrame
  394. game:GetService("RunService").RenderStepped:wait()
  395. end
  396. Object:Destroy()
  397. wait(.5)
  398. LimbAccess.Ring = true
  399. Active = true
  400. end
  401. end)
  402. Player:GetMouse().KeyDown:connect(function(key)
  403. local H = Player:GetMouse().Target
  404. if key == "f" and Active == true and H and H.Parent and H.Parent:FindFirstChild("Torso") then
  405. LimbAccess.Ring = false
  406. Active = false
  407. Ring.Anchored = true
  408. for i = 0,1,.01 do
  409. Ring.Size = Ring.Size:lerp(Vector3.new(4.5,6,2),i)
  410. Ring.CFrame = Ring.CFrame:lerp(H.Parent.Torso.CFrame,i)
  411. game:GetService("RunService").RenderStepped:wait()
  412. end
  413. Ring.Anchored = true
  414. H.Parent.Torso.Anchored = true
  415. for i = 0,1,.01 do
  416. Ring.CFrame = Ring.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
  417. Ring.CanCollide = false
  418. H.Parent.HumanoidRootPart.CFrame = H.Parent.HumanoidRootPart.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
  419. H.Parent.Torso.Velocity = Vector3.new(0,0,0)
  420. game:GetService("RunService").RenderStepped:wait()
  421. end
  422. H.Parent.Torso.Anchored = false
  423. Ring.Anchored = true
  424. LimbAccess.Ring = true
  425. H.Parent.Humanoid.WalkSpeed = 16
  426. wait(.7)
  427. Active = true
  428. end
  429. end)
  430.  
  431.  
  432.  
  433. Player:GetMouse().Button1Down:connect(function()
  434. mousepos = Player:GetMouse().Hit
  435. end)
  436.  
  437.  
  438. angle = 0
  439. angle2 = 0
  440. angle3 = 0
  441. anglespeed = 2
  442. anglespeed2 = 1
  443. anglespeed3 = .4
  444. game:GetService("RunService").Stepped:connect(function()
  445. angle = ((angle % 100) + anglespeed/10)
  446. angle2 = ((angle2 % 100) + anglespeed2/10)
  447. 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
  448. if Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude < 2 and State == "Normal" then -- idle
  449. if LimbAccess.RJ then
  450. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.5,0,0)*CFrame.Angles(math.sin(angle3)*.02,math.rad(-45),0),.2)
  451. end
  452. if LimbAccess.LA then
  453. 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)
  454. end
  455. if LimbAccess.NJ then
  456. 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)
  457. end
  458. if LimbAccess.RA then
  459. 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)
  460. end
  461. if LimbAccess.LL then
  462. 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)
  463. end
  464. if LimbAccess.RL then
  465. 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)
  466. end
  467. if LimbAccess.Ring then
  468. 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)
  469. Ring.Size = Lerp(Ring.Size,RingSize,.06)
  470. end
  471. elseif Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude > 2 and State == "Normal" then -- walk
  472. if LimbAccess.RJ then
  473. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.2,math.sin(angle2)*.1,0)*CFrame.Angles(0,math.rad(45),0),.2)
  474. end
  475. if LimbAccess.LA then
  476. 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)
  477. end
  478. if LimbAccess.NJ then
  479. 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)
  480. end
  481. if LimbAccess.RA then
  482. 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)
  483. end
  484. if LimbAccess.LL then
  485. 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)
  486. end
  487. if LimbAccess.RL then
  488. 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)
  489. end
  490. if LimbAccess.Ring then
  491. local var = math.sin(angle2)*1
  492. Ring.Size = Lerp(Ring.Size,Vector3.new(2+var,2+var,2+var),.06)
  493. Ring.Velocity = Vector3.new(0,0,0)
  494. end
  495. end
  496. if not Character:FindFirstChild("RingModel") or not Character:FindFirstChild("RingModel"):FindFirstChild("Ring") then
  497. Mode = "Polaris"
  498. if Character:FindFirstChild("RingModel") then
  499. local NewRing = RingClone:Clone()
  500. Ring = NewRing
  501. Ring.Parent = Character:FindFirstChild("RingModel")
  502. else
  503. local Model = Instance.new("Model",Character)
  504. Model.Name = "RingModel"
  505. local NewRing = RingClone:Clone()
  506. Ring = NewRing
  507. Ring.Parent = Model
  508. end
  509. end
  510. end)
Add Comment
Please, Sign In to add comment