Advertisement
ericdesouza

The magic cube

Jan 10th, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.79 KB | None | 0 0
  1. --[[-[CUBE OF POLARIS]-----
  2.  
  3.  
  4.  
  5. This cube was Edit by Ericdesouza
  6. This cube was also TheHeadIessHorsemans first script on SB that was created with Sine and lerp
  7.  
  8. KEYDOWNS:
  9. B = FREEZE MODE ( Slows )
  10. N = HEAL MODE
  11. M = DARKNESS MODE ( ACTIVATED T ABILITY )
  12. Q = SPINNING CUBE ( DMGS WITH FREEZE/HEALS WITH HEAL MODE )
  13. E = DISINERGRATE
  14. F = TELEPORT ( PRESS F OVER PLAYER AND CLICK LOCATION )
  15. T = BLACK HOLE ( DARNKESS )
  16. --[ ---------------- ]]----
  17. ----i didn't made the arrest em original script i just add the avatar.
  18. Character = game.Players.LocalPlayer.Character
  19. Player = game.Players.LocalPlayer
  20. char = Character
  21. hum = Character.Humanoid
  22. Torso = Character.Torso
  23. Head = Character.Head
  24. local s = Instance.new("Sound",char)
  25.  
  26. char.Head.face.Texture = "rbxassetid://42070872"
  27.  
  28. hum.MaxHealth = math.huge
  29.  
  30. local s = Instance.new("Sound",char)
  31. s.SoundId = "http://www.roblox.com/asset/?id=869514342"
  32. s.Pitch = 1
  33. s.Volume = 2
  34. s.Looped = true
  35. wait(1)
  36. s:play()
  37.  
  38. local Player = game:GetService("Players").LocalPlayer
  39. repeat wait(1) until Player.Character
  40. local Character = Player.Character
  41. local la = Character:FindFirstChild("Left Arm")
  42. local ra = Character:FindFirstChild("Right Arm")
  43. local ll = Character:FindFirstChild("Left Leg")
  44. local rl = Character:FindFirstChild("Right Leg")
  45. local Torso = Character:FindFirstChild("Torso")
  46. local Humanoid = Character:findFirstChild("Humanoid")
  47. Character.Animate:Destroy()
  48. Humanoid.Animator:Destroy()
  49.  
  50. local p = game.Players.LocalPlayer
  51. local char = p.Character
  52. local mouse = p:GetMouse()
  53. local larm = char["Left Arm"]
  54. local rarm = char["Right Arm"]
  55. local TitanBet = ";"
  56. local lleg = char["Left Leg"]
  57. local rleg = char["Right Leg"]
  58. local hed = char.Head
  59. local torso = char.Torso
  60. local hum = char.Humanoid
  61. local cam = game.Workspace.CurrentCamera
  62. local root = char.HumanoidRootPart
  63. local deb = false
  64. local shot = 0
  65. local l = game:GetService("Lighting")
  66. local rs = game:GetService("RunService").RenderStepped
  67. local stanceToggle = "Normal"
  68. local Mana = Instance.new("IntValue", char)
  69. Mana.Value = 5000
  70. Mana.Name = "Mana"
  71. math.randomseed(os.time())
  72. hum.WalkSpeed = 50
  73. char.Health:Destroy()
  74. hum.MaxHealth = math.huge
  75. wait(0.1)
  76. hum.Health = math.huge
  77. ----------------------------------------------------
  78. local G = Instance.new("ScreenGui")
  79. G.Parent = p.PlayerGui
  80. G.Name = "Mana"
  81. local T = Instance.new("TextLabel")
  82. T.Name = "Mana"
  83. T.Parent = G
  84. T.Text = "Mana: "..char.Mana.Value
  85. T.FontSize = "Size24"
  86. T.BackgroundTransparency = 1
  87. T.TextColor3 = Color3.new(255,255,255)
  88. T.TextStrokeTransparency = 0
  89. T.Position = UDim2.new(0,250,0,400)
  90. T.BorderSizePixel = 0
  91. --//
  92. for i = 1,30 do
  93. Instance.new('Fire',larm); Instance.new('Fire',rarm)
  94. end
  95. --//
  96. Debounces = {
  97. on = false;
  98. ks = false;
  99. CanAttack = true;
  100. CanJoke = true;
  101. NoIdl = false;
  102. Slashing = false;
  103. Slashed = false;
  104. Grabbing = false;
  105. Grabbed = false;
  106. }
  107. local Touche = {char.Name, }
  108. ----------------------------------------------------
  109. function lerp(a, b, t) -- Linear interpolation
  110. return a + (b - a)*t
  111. end
  112.  
  113. function slerp(a, b, t) --Spherical interpolation
  114. dot = a:Dot(b)
  115. if dot > 0.99999 or dot < -0.99999 then
  116. return t <= 0.5 and a or b
  117. else
  118. r = math.acos(dot)
  119. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  120. end
  121. end
  122.  
  123. function matrixInterpolate(a, b, t)
  124. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  125. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  126. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  127. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  128. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  129. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  130. local t = v1:Dot(v2)
  131. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  132. return CFrame.new()
  133. end
  134. return CFrame.new(
  135. v0.x, v0.y, v0.z,
  136. v1.x, v1.y, v1.z,
  137. v2.x, v2.y, v2.z,
  138. v3.x, v3.y, v3.z)
  139. end
  140. ----------------------------------------------------//Mesh setting
  141. local cmeshes = {}
  142. 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)
  143. ll.BodyPart = 'LeftLeg'
  144. rl.BodyPart = 'RightLeg'
  145. la.BodyPart = 'LeftArm'
  146. ra.BodyPart = 'RightArm'
  147. t.BodyPart = 'Torso'
  148. ll.MeshId,ll.OverlayTextureId,rl.MeshId,rl.OverlayTextureId = 68241558,18051314,68241677,18051314
  149. ra.MeshId,ra.OverlayTextureId,la.MeshId,la.OverlayTextureId = 68241658,18051314,68241543,18051314
  150. t.MeshId,t.OverlayTextureId=68241695,18051314
  151. local LimbAccess = {LA=true,RA=true,LL=true,RL=true,RJ=true,NJ=true,Ring=true}
  152.  
  153. local State = "Normal"
  154. local Active = true
  155. local Mode = "Polaris"
  156. local mousepos = CFrame.new(0,0,0)
  157.  
  158. function Lerp(a,b,i) -- A = First pos, B = Second Pos, i = Speed
  159. return a:lerp(b,i)
  160. end
  161.  
  162. --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.
  163. --They're usually labled x1,y1,alpha
  164.  
  165. Left_Arm = Instance.new("Weld",Torso)
  166. Left_Arm.Part0 = Torso
  167. Left_Arm.Part1 = la
  168. Left_Arm.Name = "LeftArmJ"
  169. Left_Arm.C0 = CFrame.new(-1.5,0.5,0)
  170. Left_Arm.C1 = CFrame.new(0,0.5,0)
  171. Right_Arm = Instance.new("Weld",Torso)
  172. Right_Arm.Part0 = Torso
  173. Right_Arm.Part1 = ra
  174. Right_Arm.Name = "RightArmJ"
  175. Right_Arm.C0 = CFrame.new(1.5,0.5,0)
  176. Right_Arm.C1 = CFrame.new(0,0.5,0)
  177. Left_Leg = Instance.new("Weld",Torso)
  178. Left_Leg.Part0 = Torso
  179. Left_Leg.Part1 = ll
  180. Left_Leg.Name = "LeftLegJ"
  181. Left_Leg.C0 = CFrame.new(-0.5,-1,0)
  182. Left_Leg.C1 = CFrame.new(0,1,0)
  183. Right_Leg = Instance.new("Weld",Torso)
  184. Right_Leg.Name = "RightLegJ"
  185. Right_Leg.Part0 = Torso
  186. Right_Leg.Part1 = rl
  187. Right_Leg.C0 = CFrame.new(0.5,-1,0)
  188. Right_Leg.C1 = CFrame.new(0,1,0)
  189.  
  190. local RootJoint = Instance.new("Weld",Character["HumanoidRootPart"])
  191. RootJoint.Name = "RootJ"
  192. RootJoint.Part0 = Character["HumanoidRootPart"]
  193. RootJoint.Part1 = Torso
  194.  
  195. local NeckJ = Instance.new("Weld",Torso)
  196. NeckJ.Name = "NeckJ"
  197. NeckJ.Part0 = Torso
  198. NeckJ.Part1 = Character.Head
  199. NeckJ.C1 = CFrame.new(0,-1.5,0)
  200.  
  201. local Model = Instance.new("Model",Character)
  202. Model.Name = "RingModel"
  203. local RingSize = Vector3.new(.8,.8,.8)
  204. local Ring = Instance.new("Part",Model)
  205. Ring.Name = "Ring"
  206. Ring.FormFactor = "Custom"
  207. Ring.Size = RingSize
  208. Ring.Anchored = true
  209. Ring.CanCollide = false
  210. Ring.BrickColor = BrickColor.new("White")
  211. Ring.Material = "Neon"
  212. Ring.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  213. Ring.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  214. Ring.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  215. Ring.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  216. Ring.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  217. Ring.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  218.  
  219. local RingClone = Ring:Clone()
  220.  
  221. local Sphere = Instance.new("Part")
  222. Sphere.Shape = "Ball"
  223. Sphere.Name = "Bound"
  224. Sphere.Anchored = true
  225. Sphere.BrickColor = BrickColor.new("Really black")
  226. Sphere.Transparency = .8
  227. Sphere.Material = "Neon"
  228.  
  229. function CreateRegion3FromLocAndSize(Position, Size)
  230. local SizeOffset = Size/2
  231. local Point1 = Position - SizeOffset
  232. local Point2 = Position + SizeOffset
  233. return Region3.new(Point1, Point2)
  234. end
  235.  
  236. function ModeAccess(MODE)
  237. local Colors = {
  238. Freeze=BrickColor.new("Yellow");
  239. Polaris=BrickColor.new("Red");
  240. Hearth=BrickColor.new("White");
  241. Darkness=BrickColor.new("Really black");
  242. }
  243. local Mats = {
  244. Freeze = "Ice";
  245. Polaris = "Neon";
  246. Hearth="Neon";
  247. Darkness="Neon";
  248. }
  249. local Refl = {
  250. Freeze = .35;
  251. Polaris = 0;
  252. Hearth=0;
  253. Darkness=0;
  254. }
  255. LimbAccess.LL = false
  256. LimbAccess.LA = false
  257. LimbAccess.RA = false
  258. LimbAccess.RL = false
  259. LimbAccess.NJ = false
  260. LimbAccess.Ring = false
  261. LimbAccess.RJ = false
  262. Character.Humanoid.WalkSpeed = 0
  263. local angle = 0
  264. local angles = 1
  265. for i = 1,6,.1 do
  266. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(0,0,0),.1)
  267. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  268. NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,.5,-1)*CFrame.Angles(math.rad(45),0,0),.25)
  269. Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,-1,0)*CFrame.Angles(0,0,math.rad(-2)),.1)
  270. Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,-1,0)*CFrame.Angles(0,0,math.rad(2)),.1)
  271. 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)
  272. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.03)
  273. game:GetService("RunService").RenderStepped:wait()
  274. end
  275. for i = 1,6,.1 do
  276. angle = (angle % 100) + angles/10
  277. Ring.Size = Lerp(Ring.Size,Vector3.new(5,5,5),.04)
  278. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  279. 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)
  280. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
  281. game:GetService("RunService").RenderStepped:wait()
  282. end
  283. coroutine.resume(coroutine.create(function()
  284. for i = 0,1,.04 do
  285. Ring.Transparency = i
  286. game:GetService("RunService").RenderStepped:wait()
  287. end
  288. end))
  289. for i = 1,6,.1 do
  290. angle = (angle % 100) + angles/10
  291. Ring.Size = Lerp(Ring.Size,Vector3.new(0,0,0),.04)
  292. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  293. 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)
  294. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.08)
  295. game:GetService("RunService").RenderStepped:wait()
  296. end
  297. coroutine.resume(coroutine.create(function()
  298. for i = 1,0,-.04 do
  299. Ring.Transparency = i
  300. game:GetService("RunService").RenderStepped:wait()
  301. end
  302. end))
  303. Ring.BrickColor = Colors[MODE]
  304. Ring.Material = Mats[MODE]
  305. Ring.Reflectance = Refl[MODE]
  306. for i = 1,6,.1 do
  307. angle = (angle % 100) + angles/10
  308. Ring.Size = Lerp(Ring.Size,Vector3.new(2,2,2),.04)
  309. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  310. 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)
  311. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
  312. game:GetService("RunService").RenderStepped:wait()
  313. end
  314. Ring.Transparency = 0
  315. Mode = MODE
  316. LimbAccess.LL = true
  317. LimbAccess.LA = true
  318. LimbAccess.RA = true
  319. LimbAccess.RL = true
  320. LimbAccess.NJ = true
  321. LimbAccess.Ring = true
  322. LimbAccess.RJ = true
  323. end
  324.  
  325. function Dmg(hit)
  326. local DB = false
  327.  
  328. for i,v in ipairs(game.Workspace:FindPartsInRegion3(hit,nil,80)) do
  329. if v and v.Parent and v.Parent:FindFirstChild("Head") and v.Parent.Name ~= Player.Name then
  330. if v.Parent:FindFirstChild("Humanoid") and Mode == "Freeze" then
  331. v.Parent:FindFirstChild("Humanoid"):TakeDamage(v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
  332. elseif v.Parent:FindFirstChild("Humanoid") and Mode == "Hearth" then
  333. v.Parent:FindFirstChild("Humanoid").Health = v.Parent:FindFirstChild("Humanoid").Health + (v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
  334. end
  335.  
  336. if v.Parent and DB == false then
  337. DB = true
  338. for index,object in pairs(v.Parent:GetChildren()) do
  339. if (object.ClassName == "Humanoid" and object.MaxHealth == math.huge) or (object.ClassName == "Humanoid" and object.ClassName ~= object.Name) then
  340. object:Destroy()
  341. break
  342. end
  343. end
  344. end
  345.  
  346. if Mode == "Freeze" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("Body Colors") then
  347. v.Parent:FindFirstChild("Humanoid").WalkSpeed = 3
  348. local F = Instance.new("Folder",v.Parent)
  349. F.Name = "BCOLORS"
  350.  
  351. v.Parent:FindFirstChild("Body Colors").Parent = F
  352. coroutine.resume(coroutine.create(function()
  353. wait(1)
  354. for i,v in pairs(v.Parent:GetChildren()) do
  355. if v:IsA("Part") then
  356. v.BrickColor = BrickColor.new("Red")
  357. end
  358. end
  359. end))
  360. end
  361. if Mode == "Polaris" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") then
  362. v.Parent:FindFirstChild("Humanoid").WalkSpeed = 16
  363. coroutine.resume(coroutine.create(function()
  364. wait(1)
  365. if v.Parent and v.Parent:FindFirstChild("BCOLORS") then
  366. v.Parent:FindFirstChild("BCOLORS")["Body Colors"].Parent = v.Parent
  367. v.Parent:FindFirstChild("BCOLORS"):Destroy()
  368. end
  369. end))
  370. end
  371.  
  372. end
  373. end
  374. --[[if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= Player.Name then
  375. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
  376. end]]--
  377. end
  378. Player:GetMouse().KeyDown:connect(function(key)
  379. local h=Player:GetMouse().Hit*CFrame.new(0,5,0)
  380. local a = 0
  381. local a2 = 0
  382. local as = .5
  383. local as2 = 600
  384. if key == "t" and Active == true and Mode == "Darkness" then
  385. Active = false
  386. LimbAccess.Ring = false
  387. for i = 0,6,.1 do
  388. Ring.CFrame = Lerp(Ring.CFrame,h,.1)
  389. game:GetService("RunService").RenderStepped:wait()
  390. end
  391. local news = Sphere:Clone()
  392. news.CanCollide = false
  393. repeat wait() until Character:FindFirstChild("RingModel")
  394. news.Parent = Character.RingModel
  395. news.Size = Vector3.new(100,100,100)
  396. news.CFrame = Ring.CFrame
  397. local CF = Ring.CFrame
  398. coroutine.resume(coroutine.create(function()
  399. for i = 0,40,.1 do
  400. a = (a % 100) + as/10
  401. a2 = (a2 % 100) + as/10
  402. Ring.Size = Lerp(Ring.Size,Vector3.new(3+math.sin(a2)*1,3+math.sin(a2)*1.5,3+math.sin(a2)*2),.1)
  403. Ring.CFrame = h*CFrame.Angles(a,0,a)
  404. news.Size = Lerp(news.Size,Vector3.new(100+math.sin(a2)*1,100+math.sin(a2)*1,100+math.sin(a2)*1),.1)
  405. news.CFrame = CF
  406. news.Transparency = .5+(math.sin(a)*.5)
  407. game:GetService("RunService").RenderStepped:wait()
  408. end
  409. end))
  410. for i = 1,40,.1 do
  411. for i,v in pairs(game.Players:GetChildren()) do
  412. if v and v:IsA("Player") and v.Character ~= nil and v.Character:FindFirstChild("Torso") then
  413. if v and v.Character and v.Character:FindFirstChild("Torso") and v.Name ~= Player.Name then
  414. 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
  415. local V = Instance.new("BodyVelocity",v.Character.Torso)
  416. V.Name = "BOD"
  417. V.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  418. end
  419. 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
  420. 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
  421. 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
  422. v.Character:FindFirstChild("Humanoid").Health = v.Character:FindFirstChild("Humanoid").Health - (v.Character:FindFirstChild("Humanoid").MaxHealth*.006)
  423. end
  424. end
  425. end
  426. end
  427. end
  428. game:GetService("RunService").RenderStepped:wait()
  429. end
  430. for i,v in pairs(game.Players:GetChildren()) do
  431. if v and v:IsA("Player") and v.Character and v.Character:FindFirstChild("Torso") and v.Character.Torso:FindFirstChild("BOD") then
  432. v.Character.Torso:FindFirstChild("BOD"):Destroy()
  433. end
  434. end
  435. for i = news.Transparency,1,-.01 do
  436. news.Transparency = i
  437. game:GetService("RunService").RenderStepped:wait()
  438. end
  439. LimbAccess.Ring = true
  440. Active = true
  441. news:Destroy()
  442. end
  443. end)
  444. Player:GetMouse().KeyDown:connect(function(key)
  445. local angle = 0
  446. local anglespeed = 1
  447. if key == "q" and Active == true then
  448. Active = false
  449. LimbAccess.Ring = false
  450. local x,y,z = 50,50,50
  451. local pos = Player:GetMouse().Hit
  452. for i = 0,1,.01 do
  453. angle = (angle % 100) + anglespeed/10
  454. Ring.Size = Lerp(Ring.Size,Vector3.new(x,y,z),.05)
  455. 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)
  456. game:GetService("RunService").RenderStepped:wait()
  457. end
  458. for i = 1,10,.1 do
  459. local reg = CreateRegion3FromLocAndSize(pos.p,Vector3.new(x,y,z))
  460. Dmg(reg,Mode)
  461.  
  462. angle = (angle % 100) + anglespeed/10
  463. Ring.CFrame = CFrame.new(pos.p.x,pos.p.y,pos.p.z)*CFrame.new(0,y/2,0)*CFrame.Angles(0,angle,0)
  464. game:GetService("RunService").RenderStepped:wait()
  465. end
  466. LimbAccess.Ring = true
  467. wait(.5)
  468. Active = true
  469. end
  470. end)
  471. Player:GetMouse().KeyDown:connect(function(key)
  472.  
  473. if key == "b" and Active == true then
  474. Active = false
  475. ModeAccess("Freeze")
  476. wait(1)
  477. Active = true
  478. Character.Humanoid.WalkSpeed = 16
  479. elseif key == "p" and Active == true then
  480. Active = false
  481. ModeAccess("Polaris")
  482. wait(1)
  483. Active = true
  484. Character.Humanoid.WalkSpeed = 16
  485. elseif key == "n" and Active == true then
  486. Active = false
  487. ModeAccess("Hearth")
  488. wait(1)
  489. Active = true
  490. Character.Humanoid.WalkSpeed = 16
  491. elseif key == "m" and Active == true then
  492. Active = false
  493. ModeAccess("Darkness")
  494. wait(1)
  495. Active = true
  496. Character.Humanoid.WalkSpeed = 16
  497. end
  498. end)
  499.  
  500. Player:GetMouse().KeyDown:connect(function(key)
  501. local Object = Player:GetMouse().Target
  502. if key == "e" and Active == true and Object:IsA("Part") and Object.Name ~= "BasePlate" and Object.Name ~= "Baseplate" and Object.Name ~= "Base" then
  503. Active = false
  504. LimbAccess.Ring = false
  505. for i = 0,1,.01 do
  506. Ring.Size = Ring.Size:lerp(Object.Size+Vector3.new(.5,.5,.5),i)
  507. Ring.CFrame = Ring.CFrame:lerp(Object.CFrame,i)
  508. game:GetService("RunService").RenderStepped:wait()
  509. end
  510. for i = 0,.5,.01 do
  511. Ring.Size = Object.Size+Vector3.new(.5,.5,.5)
  512. Ring.CFrame = Object.CFrame
  513. game:GetService("RunService").RenderStepped:wait()
  514. end
  515. Object:Destroy()
  516. wait(.5)
  517. LimbAccess.Ring = true
  518. Active = true
  519. end
  520. end)
  521. Player:GetMouse().KeyDown:connect(function(key)
  522. local H = Player:GetMouse().Target
  523. if key == "f" and Active == true and H and H.Parent and H.Parent:FindFirstChild("Torso") then
  524. LimbAccess.Ring = false
  525. Active = false
  526. Ring.Anchored = true
  527. for i = 0,1,.01 do
  528. Ring.Size = Ring.Size:lerp(Vector3.new(4.5,6,2),i)
  529. Ring.CFrame = Ring.CFrame:lerp(H.Parent.Torso.CFrame,i)
  530. game:GetService("RunService").RenderStepped:wait()
  531. end
  532. Ring.Anchored = true
  533. H.Parent.Torso.Anchored = true
  534. for i = 0,1,.01 do
  535. Ring.CFrame = Ring.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
  536. Ring.CanCollide = false
  537. H.Parent.HumanoidRootPart.CFrame = H.Parent.HumanoidRootPart.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
  538. H.Parent.Torso.Velocity = Vector3.new(0,0,0)
  539. game:GetService("RunService").RenderStepped:wait()
  540. end
  541. H.Parent.Torso.Anchored = false
  542. Ring.Anchored = true
  543. LimbAccess.Ring = true
  544. H.Parent.Humanoid.WalkSpeed = 16
  545. wait(.7)
  546. Active = true
  547. end
  548. end)
  549.  
  550.  
  551.  
  552. Player:GetMouse().Button1Down:connect(function()
  553. mousepos = Player:GetMouse().Hit
  554. end)
  555.  
  556.  
  557. angle = 0
  558. angle2 = 0
  559. angle3 = 0
  560. anglespeed = 2
  561. anglespeed2 = 1
  562. anglespeed3 = .4
  563. game:GetService("RunService").Stepped:connect(function()
  564. angle = ((angle % 100) + anglespeed/10)
  565. angle2 = ((angle2 % 100) + anglespeed2/10)
  566. 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
  567. if Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude < 2 and State == "Normal" then -- idle
  568. if LimbAccess.RJ then
  569. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.5,0,0)*CFrame.Angles(math.sin(angle3)*.02,math.rad(-45),0),.2)
  570. end
  571. if LimbAccess.LA then
  572. 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)
  573. end
  574. if LimbAccess.NJ then
  575. 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)
  576. end
  577. if LimbAccess.RA then
  578. 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)
  579. end
  580. if LimbAccess.LL then
  581. 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)
  582. end
  583. if LimbAccess.RL then
  584. 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)
  585. end
  586. if LimbAccess.Ring then
  587. 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)
  588. Ring.Size = Lerp(Ring.Size,RingSize,.06)
  589. end
  590. elseif Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude > 2 and State == "Normal" then -- walk
  591. if LimbAccess.RJ then
  592. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.2,math.sin(angle2)*.1,0)*CFrame.Angles(0,math.rad(45),0),.2)
  593. end
  594. if LimbAccess.LA then
  595. 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)
  596. end
  597. if LimbAccess.NJ then
  598. 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)
  599. end
  600. if LimbAccess.RA then
  601. 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)
  602. end
  603. if LimbAccess.LL then
  604. 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)
  605. end
  606. if LimbAccess.RL then
  607. 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)
  608. end
  609. if LimbAccess.Ring then
  610. local var = math.sin(angle2)*1
  611. Ring.Size = Lerp(Ring.Size,Vector3.new(2+var,2+var,2+var),.06)
  612. Ring.CFrame = Lerp(Ring.CFrame,CFrame.new((ra.CFrame*CFrame.new(0,-3,-.3)).p,Player:GetMouse().hit.p),.8)
  613. Ring.Velocity = Vector3.new(0,0,0)
  614. end
  615. end
  616. if not Character:FindFirstChild("RingModel") or not Character:FindFirstChild("RingModel"):FindFirstChild("Ring") then
  617. Mode = "Polaris"
  618. if Character:FindFirstChild("RingModel") then
  619. local NewRing = RingClone:Clone()
  620. Ring = NewRing
  621. Ring.Parent = Character:FindFirstChild("RingModel")
  622. else
  623. local Model = Instance.new("Model",Character)
  624. Model.Name = "RingModel"
  625. local NewRing = RingClone:Clone()
  626. Ring = NewRing
  627. Ring.Parent = Model
  628. end
  629. end
  630. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement