Advertisement
NextFlamePB

ROBLOX Rubix Cube Script

Jan 21st, 2018
4,047
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 59.16 KB | None | 0 0
  1. local IDs = {340106355,927529620,876981900,398987889}
  2.  
  3. function swait(num)
  4. if num==0 or num==nil then
  5. game:service'RunService'.Stepped:wait(0)
  6. else
  7. for i=0,num do
  8. game:service'RunService'.Stepped:wait(0)
  9. end
  10. end
  11. end
  12. function thread(f)
  13.   coroutine.resume(coroutine.create(f))
  14. end
  15. function clerp(a, b, t)
  16.     local qa = {
  17.         QuaternionFromCFrame(a)
  18.     }
  19.     local qb = {
  20.         QuaternionFromCFrame(b)
  21.     }
  22.     local ax, ay, az = a.x, a.y, a.z
  23.     local bx, by, bz = b.x, b.y, b.z
  24.     local _t = 1 - t
  25.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  26. end
  27. function QuaternionFromCFrame(cf)
  28.   local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  29.   local trace = m00 + m11 + m22
  30.   if trace > 0 then
  31.     local s = math.sqrt(1 + trace)
  32.     local recip = 0.5 / s
  33.     return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  34.   else
  35.     local i = 0
  36.     if m00 < m11 then
  37.       i = 1
  38.     end
  39.     if m22 > (i == 0 and m00 or m11) then
  40.       i = 2
  41.     end
  42.     if i == 0 then
  43.       local s = math.sqrt(m00 - m11 - m22 + 1)
  44.       local recip = 0.5 / s
  45.       return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  46.     elseif i == 1 then
  47.       local s = math.sqrt(m11 - m22 - m00 + 1)
  48.       local recip = 0.5 / s
  49.       return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  50.     elseif i == 2 then
  51.       local s = math.sqrt(m22 - m00 - m11 + 1)
  52.       local recip = 0.5 / s
  53.       return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  54.     end
  55.   end
  56. end
  57. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  58.   local xs, ys, zs = x + x, y + y, z + z
  59.   local wx, wy, wz = w * xs, w * ys, w * zs
  60.   local xx = x * xs
  61.   local xy = x * ys
  62.   local xz = x * zs
  63.   local yy = y * ys
  64.   local yz = y * zs
  65.   local zz = z * zs
  66.   return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  67. end
  68. function QuaternionSlerp(a, b, t)
  69.   local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  70.   local startInterp, finishInterp
  71.   if cosTheta >= 1.0E-4 then
  72.     if 1 - cosTheta > 1.0E-4 then
  73.       local theta = math.acos(cosTheta)
  74.       local invSinTheta = 1 / math.sin(theta)
  75.       startInterp = math.sin((1 - t) * theta) * invSinTheta
  76.       finishInterp = math.sin(t * theta) * invSinTheta
  77.     else
  78.       startInterp = 1 - t
  79.       finishInterp = t
  80.     end
  81.   elseif 1 + cosTheta > 1.0E-4 then
  82.     local theta = math.acos(-cosTheta)
  83.     local invSinTheta = 1 / math.sin(theta)
  84.     startInterp = math.sin((t - 1) * theta) * invSinTheta
  85.     finishInterp = math.sin(t * theta) * invSinTheta
  86.   else
  87.     startInterp = t - 1
  88.     finishInterp = t
  89.   end
  90.   return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  91. end
  92. function rayCast(Position, Direction, Range, Ignore)
  93.   return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  94. end
  95. --Wait what okay
  96. wait()
  97. local plr = game:service'Players'.LocalPlayer
  98. local char = plr.Character
  99. local hum = char.Humanoid
  100. local ra = char["Right Arm"]
  101. local la= char["Left Arm"]
  102. local rl= char["Right Leg"]
  103. local ll = char["Left Leg"]
  104. local hed = char.Head
  105. local root = char.HumanoidRootPart
  106. local rootj = root.RootJoint
  107. local tors = char.Torso
  108. local mouse = plr:GetMouse()
  109. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  110. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  111. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  112. local maincolor = BrickColor.new("Magenta")
  113. cf = CFrame.new
  114. angles = CFrame.Angles
  115. attack = false
  116. euler=CFrame.fromEulerAnglesXYZ
  117. equipped = false
  118. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  119. RSH, LSH = nil, nil
  120. RW = Instance.new("Weld")
  121. LW = Instance.new("Weld")
  122. RH = tors["Right Hip"]
  123. LH = tors["Left Hip"]
  124. RSH = tors["Right Shoulder"]
  125. LSH = tors["Left Shoulder"]
  126. RSH.Parent = nil
  127. LSH.Parent = nil
  128. RW.Name = "RW"
  129. RW.Part0 = tors
  130. RW.C0 = CFrame.new(1.5, 0.5, 0)
  131. RW.C1 = CFrame.new(0, 0.5, 0)
  132. RW.Part1 = ra
  133. RW.Parent = tors
  134. LW.Name = "LW"
  135. LW.Part0 = tors
  136. LW.C0 = CFrame.new(-1.5, 0.5, 0)
  137. LW.C1 = CFrame.new(0, 0.5, 0)
  138. LW.Part1 = la
  139. LW.Parent = tors
  140. print('User is '..plr.Name)
  141. Effects = {}
  142.    
  143. ArtificialHB = Instance.new("BindableEvent", script)
  144. ArtificialHB.Name = "Heartbeat"
  145.  
  146. script:WaitForChild("Heartbeat")
  147.  
  148. frame = 1 / 60
  149. tf = 0
  150. allowframeloss = false
  151. tossremainder = false
  152. lastframe = tick()
  153. script.Heartbeat:Fire()
  154.  
  155. game:GetService("RunService").Heartbeat:connect(function(s, p)
  156.     tf = tf + s
  157.     if tf >= frame then
  158.         if allowframeloss then
  159.             script.Heartbeat:Fire()
  160.             lastframe = tick()
  161.         else
  162.             for i = 1, math.floor(tf / frame) do
  163.                 script.Heartbeat:Fire()
  164.             end
  165.             lastframe = tick()
  166.         end
  167.         if tossremainder then
  168.             tf = 0
  169.         else
  170.             tf = tf - frame * math.floor(tf / frame)
  171.         end
  172.     end
  173. end)
  174. local RbxUtility = LoadLibrary("RbxUtility")
  175. local Create = RbxUtility.Create
  176.  
  177. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  178.     if hit.Parent == nil then
  179.         return
  180.     end
  181.     local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  182.     for _, v in pairs(hit.Parent:children()) do
  183.         if v:IsA("Humanoid") then
  184.             h = v
  185.         end
  186.     end
  187.          if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  188.          warn'No R15 allowed'
  189.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  190.          end
  191.  
  192.     if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  193.         if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  194.             if hit.Parent.DebounceHit.Value == true then
  195.                 return
  196.             end
  197.         end
  198.          if insta == true then
  199.          hit.Parent:FindFirstChild("Head"):BreakJoints()
  200.          end
  201.         local c = Create("ObjectValue"){
  202.             Name = "creator",
  203.             Value = game:service("Players").LocalPlayer,
  204.             Parent = h,
  205.         }
  206.         game:GetService("Debris"):AddItem(c, .5)
  207.         if HitSound ~= nil and HitPitch ~= nil then
  208.             CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  209.         end
  210.         local Damage = math.random(minim, maxim)
  211.         local blocked = false
  212.         local block = hit.Parent:findFirstChild("Block")
  213.         if block ~= nil then
  214.             if block.className == "IntValue" then
  215.                 if block.Value > 0 then
  216.                     blocked = true
  217.                     block.Value = block.Value - 1
  218.                     print(block.Value)
  219.                 end
  220.             end
  221.         end
  222.         if blocked == false then
  223.             h.Health = h.Health - Damage
  224.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  225.         else
  226.             h.Health = h.Health - (Damage / 2)
  227.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  228.         end
  229.         if Type == "Knockdown" then
  230.             local hum = hit.Parent.Humanoid
  231.             hum.PlatformStand = true
  232.             coroutine.resume(coroutine.create(function(HHumanoid)
  233.                 swait(1)
  234.                 HHumanoid.PlatformStand = false
  235.             end), hum)
  236.             local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  237.             local bodvol = Create("BodyVelocity"){
  238.                 velocity = angle * knockback,
  239.                 P = 5000,
  240.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  241.                 Parent = hit,
  242.             }
  243.             local rl = Create("BodyAngularVelocity"){
  244.                 P = 3000,
  245.                 maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  246.                 angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  247.                 Parent = hit,
  248.             }
  249.             game:GetService("Debris"):AddItem(bodvol, .5)
  250.             game:GetService("Debris"):AddItem(rl, .5)
  251.         elseif Type == "Normal" then
  252.             local vp = Create("BodyVelocity"){
  253.                 P = 500,
  254.                 maxForce = Vector3.new(math.huge, 0, math.huge),
  255.                 velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  256.             }
  257.             if knockback > 0 then
  258.                 vp.Parent = hit.Parent.Torso
  259.             end
  260.             game:GetService("Debris"):AddItem(vp, .5)
  261.         elseif Type == "Up" then
  262.             local bodyVelocity = Create("BodyVelocity"){
  263.                 velocity = Vector3.new(0, 20, 0),
  264.                 P = 5000,
  265.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  266.                 Parent = hit,
  267.             }
  268.             game:GetService("Debris"):AddItem(bodyVelocity, .5)
  269.         elseif Type == "DarkUp" then
  270.             coroutine.resume(coroutine.create(function()
  271.                 for i = 0, 1, 0.1 do
  272.                     swait()
  273.                     Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  274.                 end
  275.             end))
  276.             local bodyVelocity = Create("BodyVelocity"){
  277.                 velocity = Vector3.new(0, 20, 0),
  278.                 P = 5000,
  279.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  280.                 Parent = hit,
  281.             }
  282.             game:GetService("Debris"):AddItem(bodyVelocity, 1)
  283.         elseif Type == "Snare" then
  284.             local bp = Create("BodyPosition"){
  285.                 P = 2000,
  286.                 D = 100,
  287.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  288.                 position = hit.Parent.Torso.Position,
  289.                 Parent = hit.Parent.Torso,
  290.             }
  291.             game:GetService("Debris"):AddItem(bp, 1)
  292.         elseif Type == "Freeze" then
  293.             local BodPos = Create("BodyPosition"){
  294.                 P = 50000,
  295.                 D = 1000,
  296.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  297.                 position = hit.Parent.Torso.Position,
  298.                 Parent = hit.Parent.Torso,
  299.             }
  300.             local BodGy = Create("BodyGyro") {
  301.                 maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  302.                 P = 20e+003,
  303.                 Parent = hit.Parent.Torso,
  304.                 cframe = hit.Parent.Torso.CFrame,
  305.             }
  306.             hit.Parent.Torso.Anchored = true
  307.             coroutine.resume(coroutine.create(function(Part)
  308.                 swait(1.5)
  309.                 Part.Anchored = false
  310.             end), hit.Parent.Torso)
  311.             game:GetService("Debris"):AddItem(BodPos, 3)
  312.             game:GetService("Debris"):AddItem(BodGy, 3)
  313.         end
  314.         local debounce = Create("BoolValue"){
  315.             Name = "DebounceHit",
  316.             Parent = hit.Parent,
  317.             Value = true,
  318.         }
  319.         game:GetService("Debris"):AddItem(debounce, Delay)
  320.         c = Create("ObjectValue"){
  321.             Name = "creator",
  322.             Value = Player,
  323.             Parent = h,
  324.         }
  325.         game:GetService("Debris"):AddItem(c, .5)
  326.     end
  327. end
  328.  
  329. function ShowDamage(Pos, Text, Time, Color)
  330.     local Rate = (1 / 30)
  331.     local Pos = (Pos or Vector3.new(0, 0, 0))
  332.     local Text = (Text or "")
  333.     local Time = (Time or 2)
  334.     local Color = (Color or Color3.new(1, 0, 1))
  335.     local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  336.     EffectPart.Anchored = true
  337.     local BillboardGui = Create("BillboardGui"){
  338.         Size = UDim2.new(3, 0, 3, 0),
  339.         Adornee = EffectPart,
  340.         Parent = EffectPart,
  341.     }
  342.     local TextLabel = Create("TextLabel"){
  343.         BackgroundTransparency = 1,
  344.         Size = UDim2.new(1, 0, 1, 0),
  345.         Text = Text,
  346.         Font = "Highway",
  347.         TextColor3 = Color,
  348.         TextScaled = true,
  349.         Parent = BillboardGui,
  350.     }
  351.     game.Debris:AddItem(EffectPart, (Time))
  352.     EffectPart.Parent = game:GetService("Workspace")
  353.     delay(0, function()
  354.         local Frames = (Time / Rate)
  355.         for Frame = 1, Frames do
  356.             wait(Rate)
  357.             local Percent = (Frame / Frames)
  358.             EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  359.             TextLabel.TextTransparency = Percent
  360.         end
  361.         if EffectPart and EffectPart.Parent then
  362.             EffectPart:Destroy()
  363.         end
  364.     end)
  365. end
  366. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  367.     for _, c in pairs(workspace:children()) do
  368.         local hum = c:findFirstChild("Humanoid")
  369.         if hum ~= nil then
  370.             local head = c:findFirstChild("Torso") or c:findFirstChild("UpperTorso") or c:FindFirstChild('LowerTorso')
  371.             if head ~= nil then
  372.                 local targ = head.Position - Part.Position
  373.                 local mag = targ.magnitude
  374.                 if mag <= Magnitude and c.Name ~= plr.Name then
  375.                     Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, root, .1, "rbxassetid://" .. HitSound, HitPitch)
  376.                 end
  377.             end
  378.         end
  379.     end
  380. end
  381. CFuncs = {
  382.   Part = {
  383.     Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  384.       local Part = Create("Part")({
  385.         Parent = Parent,
  386.         Reflectance = Reflectance,
  387.         Transparency = Transparency,
  388.         CanCollide = false,
  389.         Locked = true,
  390.         BrickColor = BrickColor.new(tostring(BColor)),
  391.         Name = Name,
  392.         Size = Size,
  393.         Material = Material
  394.       })
  395.       RemoveOutlines(Part)
  396.       return Part
  397.     end
  398.   },
  399.   Mesh = {
  400.     Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  401.       local Msh = Create(Mesh)({
  402.         Parent = Part,
  403.         Offset = OffSet,
  404.         Scale = Scale
  405.       })
  406.       if Mesh == "SpecialMesh" then
  407.         Msh.MeshType = MeshType
  408.         Msh.MeshId = MeshId
  409.       end
  410.       return Msh
  411.     end
  412.   },
  413.   Mesh = {
  414.     Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  415.       local Msh = Create(Mesh)({
  416.         Parent = Part,
  417.         Offset = OffSet,
  418.         Scale = Scale
  419.       })
  420.       if Mesh == "SpecialMesh" then
  421.         Msh.MeshType = MeshType
  422.         Msh.MeshId = MeshId
  423.       end
  424.       return Msh
  425.     end
  426.   },
  427.   Weld = {
  428.     Create = function(Parent, Part0, Part1, C0, C1)
  429.       local Weld = Create("Weld")({
  430.         Parent = Parent,
  431.         Part0 = Part0,
  432.         Part1 = Part1,
  433.         C0 = C0,
  434.         C1 = C1
  435.       })
  436.       return Weld
  437.     end
  438.   },
  439.   Sound = {
  440.     Create = function(id, par, vol, pit)
  441.       coroutine.resume(coroutine.create(function()
  442.         local S = Create("Sound")({
  443.           Volume = vol,
  444.           Pitch = pit or 1,
  445.           SoundId = id,
  446.           Parent = par or workspace
  447.         })
  448.         wait()
  449.         S:play()
  450.         game:GetService("Debris"):AddItem(S, 6)
  451.       end))
  452.     end
  453.   },
  454.   ParticleEmitter = {
  455.     Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  456.       local fp = Create("ParticleEmitter")({
  457.         Parent = Parent,
  458.         Color = ColorSequence.new(Color1, Color2),
  459.         LightEmission = LightEmission,
  460.         Size = Size,
  461.         Texture = Texture,
  462.         Transparency = Transparency,
  463.         ZOffset = ZOffset,
  464.         Acceleration = Accel,
  465.         Drag = Drag,
  466.         LockedToPart = LockedToPart,
  467.         VelocityInheritance = VelocityInheritance,
  468.         EmissionDirection = EmissionDirection,
  469.         Enabled = Enabled,
  470.         Lifetime = LifeTime,
  471.         Rate = Rate,
  472.         Rotation = Rotation,
  473.         RotSpeed = RotSpeed,
  474.         Speed = Speed,
  475.         VelocitySpread = VelocitySpread
  476.       })
  477.       return fp
  478.     end
  479.   }
  480. }
  481. function RemoveOutlines(part)
  482.   part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  483. end
  484. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  485.   local Part = Create("Part")({
  486.     formFactor = FormFactor,
  487.     Parent = Parent,
  488.     Reflectance = Reflectance,
  489.     Transparency = Transparency,
  490.     CanCollide = false,
  491.     Locked = true,
  492.     BrickColor = BrickColor.new(tostring(BColor)),
  493.     Name = Name,
  494.     Size = Size,
  495.     Material = Material
  496.   })
  497.   RemoveOutlines(Part)
  498.   return Part
  499. end
  500. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  501.   local Msh = Create(Mesh)({
  502.     Parent = Part,
  503.     Offset = OffSet,
  504.     Scale = Scale
  505.   })
  506.   if Mesh == "SpecialMesh" then
  507.     Msh.MeshType = MeshType
  508.     Msh.MeshId = MeshId
  509.   end
  510.   return Msh
  511. end
  512. function CreateWeld(Parent, Part0, Part1, C0, C1)
  513.   local Weld = Create("Weld")({
  514.     Parent = Parent,
  515.     Part0 = Part0,
  516.     Part1 = Part1,
  517.     C0 = C0,
  518.     C1 = C1
  519.   })
  520.   return Weld
  521. end
  522. EffectModel = Instance.new("Model", char)
  523. Effects = {
  524.   Block = {
  525.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  526.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  527.       prt.Anchored = true
  528.       prt.CFrame = cframe
  529.       local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  530.       game:GetService("Debris"):AddItem(prt, 10)
  531.       if Type == 1 or Type == nil then
  532.         table.insert(Effects, {
  533.           prt,
  534.           "Block1",
  535.           delay,
  536.           x3,
  537.           y3,
  538.           z3,
  539.           msh
  540.         })
  541.       elseif Type == 2 then
  542.         table.insert(Effects, {
  543.           prt,
  544.           "Block2",
  545.           delay,
  546.           x3,
  547.           y3,
  548.           z3,
  549.           msh
  550.         })
  551.       else
  552.         table.insert(Effects, {
  553.           prt,
  554.           "Block3",
  555.           delay,
  556.           x3,
  557.           y3,
  558.           z3,
  559.           msh
  560.         })
  561.       end
  562.     end
  563.   },
  564.   Sphere = {
  565.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  566.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  567.       prt.Anchored = true
  568.       prt.CFrame = cframe
  569.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  570.       game:GetService("Debris"):AddItem(prt, 10)
  571.       table.insert(Effects, {
  572.         prt,
  573.         "Cylinder",
  574.         delay,
  575.         x3,
  576.         y3,
  577.         z3,
  578.         msh
  579.       })
  580.     end
  581.   },
  582.   Cylinder = {
  583.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  584.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  585.       prt.Anchored = true
  586.       prt.CFrame = cframe
  587.       local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  588.       game:GetService("Debris"):AddItem(prt, 10)
  589.       table.insert(Effects, {
  590.         prt,
  591.         "Cylinder",
  592.         delay,
  593.         x3,
  594.         y3,
  595.         z3,
  596.         msh
  597.       })
  598.     end
  599.   },
  600.   Wave = {
  601.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  602.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  603.       prt.Anchored = true
  604.       prt.CFrame = cframe
  605.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  606.       game:GetService("Debris"):AddItem(prt, 10)
  607.       table.insert(Effects, {
  608.         prt,
  609.         "Cylinder",
  610.         delay,
  611.         x3 / 60,
  612.         y3 / 60,
  613.         z3 / 60,
  614.         msh
  615.       })
  616.     end
  617.   },
  618.   Ring = {
  619.     Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  620.       local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  621.       prt.Anchored = true
  622.       prt.CFrame = cframe
  623.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  624.       game:GetService("Debris"):AddItem(prt, 10)
  625.       table.insert(Effects, {
  626.         prt,
  627.         "Cylinder",
  628.         delay,
  629.         x3,
  630.         y3,
  631.         z3,
  632.         msh
  633.       })
  634.     end
  635.   },
  636.   Break = {
  637.     Create = function(brickcolor, cframe, x1, y1, z1)
  638.       local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  639.       prt.Anchored = true
  640.       prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  641.       local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  642.       local num = math.random(10, 50) / 1000
  643.       game:GetService("Debris"):AddItem(prt, 10)
  644.       table.insert(Effects, {
  645.         prt,
  646.         "Shatter",
  647.         num,
  648.         prt.CFrame,
  649.         math.random() - math.random(),
  650.         0,
  651.         math.random(50, 100) / 100
  652.       })
  653.     end
  654.   }
  655. }
  656. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  657.   local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  658.   prt.Anchored = true
  659.   prt.CFrame = cframe
  660.   local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  661.   game:GetService("Debris"):AddItem(prt, 10)
  662.   if Type == 1 or Type == nil then
  663.     table.insert(Effects, {
  664.       prt,
  665.       "Block1",
  666.       delay,
  667.       x3,
  668.       y3,
  669.       z3,
  670.       msh
  671.     })
  672.   elseif Type == 2 then
  673.     table.insert(Effects, {
  674.       prt,
  675.       "Block2",
  676.       delay,
  677.       x3,
  678.       y3,
  679.       z3,
  680.       msh
  681.     })
  682.   elseif Type == 3 then
  683.     table.insert(Effects, {
  684.       prt,
  685.       "Block3",
  686.       delay,
  687.       x3,
  688.       y3,
  689.       z3,
  690.       msh
  691.     })
  692.   end
  693. end
  694. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  695.   local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  696.   prt.Anchored = true
  697.   prt.CFrame = cframe
  698.   local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  699.   game:GetService("Debris"):AddItem(prt, 10)
  700.   table.insert(Effects, {
  701.     prt,
  702.     "Cylinder",
  703.     delay,
  704.     x3,
  705.     y3,
  706.     z3,
  707.     msh
  708.   })
  709. end
  710. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  711.   local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  712.   prt.Anchored = true
  713.   prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  714.   local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  715.   game:GetService("Debris"):AddItem(prt, 10)
  716.   table.insert(Effects, {
  717.     prt,
  718.     "Cylinder",
  719.     delay,
  720.     x3,
  721.     y3,
  722.     z3,
  723.     msh
  724.   })
  725. end
  726. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  727.   local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  728.   prt.Anchored = true
  729.   prt.CFrame = cframe
  730.   local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  731.   game:GetService("Debris"):AddItem(prt, 10)
  732.   table.insert(Effects, {
  733.     prt,
  734.     "Cylinder",
  735.     delay,
  736.     x3,
  737.     y3,
  738.     z3,
  739.     msh
  740.   })
  741. end
  742. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  743.   local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  744.   prt.Anchored = true
  745.   prt.CFrame = cframe
  746.   local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  747.   game:GetService("Debris"):AddItem(prt, 10)
  748.   table.insert(Effects, {
  749.     prt,
  750.     "Cylinder",
  751.     delay,
  752.     x3,
  753.     y3,
  754.     z3,
  755.     msh
  756.   })
  757. end
  758. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  759.   local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  760.   prt.Anchored = true
  761.   prt.CFrame = cframe
  762.   local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  763.   game:GetService("Debris"):AddItem(prt, 10)
  764.   table.insert(Effects, {
  765.     prt,
  766.     "Cylinder",
  767.     delay,
  768.     x3,
  769.     y3,
  770.     z3,
  771.     msh
  772.   })
  773. end
  774. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  775.   local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  776.   prt.Anchored = true
  777.   prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  778.   local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  779.   local num = math.random(10, 50) / 1000
  780.   game:GetService("Debris"):AddItem(prt, 10)
  781.   table.insert(Effects, {
  782.     prt,
  783.     "Shatter",
  784.     num,
  785.     prt.CFrame,
  786.     math.random() - math.random(),
  787.     0,
  788.     math.random(50, 100) / 100
  789.   })
  790. end
  791. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  792. local fp=Instance.new("Part")
  793. fp.formFactor=formfactor
  794. fp.Parent=parent
  795. fp.Reflectance=reflectance
  796. fp.Transparency=transparency
  797. fp.CanCollide=false
  798. fp.Locked=true
  799. fp.BrickColor=brickcolor
  800. fp.Name=name
  801. fp.Size=size
  802. fp.Position=tors.Position
  803. RemoveOutlines(fp)
  804. fp.Material="SmoothPlastic"
  805. fp:BreakJoints()
  806. return fp
  807. end
  808.  
  809. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  810. local mesh=Instance.new(Mesh)
  811. mesh.Parent=part
  812. if Mesh=="SpecialMesh" then
  813. mesh.MeshType=meshtype
  814. if meshid~="nil" then
  815. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  816. end
  817. end
  818. mesh.Offset=offset
  819. mesh.Scale=scale
  820. return mesh
  821. end
  822. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  823. local prt=part(3,char,0,0,brickcolor,"Effect",Vector3.new(0.5,0.5,0.5))
  824. prt.Anchored=true
  825. prt.Material = "Neon"
  826. prt.CFrame=cframe
  827. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  828. msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
  829. game:GetService("Debris"):AddItem(prt,5)
  830. coroutine.resume(coroutine.create(function(Part,Mesh)
  831. for i=0,1,delay do
  832. swait()
  833. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  834. Part.Transparency=i
  835. Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
  836. end
  837. Part.Parent=nil
  838. end),prt,msh)
  839. end
  840. function MagicShockTrailAlt2(origcolor2,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  841. local prt=part(3,char,0,0,origcolor2,"Effect",Vector3.new(0.5,0.5,0.5))
  842. prt.Anchored=true
  843. prt.Material = "Neon"
  844. prt.CFrame=cframe
  845. msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
  846. game:GetService("Debris"):AddItem(prt,5)
  847. coroutine.resume(coroutine.create(function(Part,Mesh)
  848.     local rtype = rottype
  849. for i=0,1,delay do
  850. swait()
  851. if rtype == 1 then
  852. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  853. elseif rtype == 2 then
  854. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  855. end
  856. prt.Transparency=i
  857. Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
  858. end
  859. Part.Parent=nil
  860. end),prt,msh)
  861. end
  862.  
  863. --[[
  864.         Thanks for using Build-To-Lua by jarredbcv.
  865. ]]--
  866.  
  867. New = function(Object, Parent, Name, Data)
  868.     local Object = Instance.new(Object)
  869.     for Index, Value in pairs(Data or {}) do
  870.         Object[Index] = Value
  871.     end
  872.     Object.Parent = Parent
  873.     Object.Name = Name
  874.     return Object
  875. end
  876.    
  877. RubiksCube = New("Model",char,"RubiksCube",{})
  878. Handle = New("Part",RubiksCube,"Handle",{BrickColor = BrickColor.new("Really black"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(1.19135904, 1.19135904, 1.19135904),CFrame = CFrame.new(98.4000549, 0.595682025, 171.196167, 1, 0, 0, 0, 1, 0, 0, 0, 1),TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  879. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029755, 1.17155194, 171.196136, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  880. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  881. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(-0.397079468, 0.575869918, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  882. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.595685005, 170.799026, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  883. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  884. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, 2.98023224e-06, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  885. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.992842019, 171.196136, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  886. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  887. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, 0.397159994, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  888. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.992842019, 170.799026, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  889. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  890. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, 0.397159994, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  891. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029602, 1.17155194, 170.799026, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  892. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  893. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(-0.397094727, 0.575869918, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  894. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029755, 1.17155194, 171.593292, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  895. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  896. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(-0.397079468, 0.575869918, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  897. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029907, 0.198476017, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  898. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  899. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.397064209, -0.397206008, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  900. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029907, 0.595668972, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  901. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  902. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.397064209, -1.30534172e-05, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  903. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.198473006, 170.799026, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  904. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  905. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, -0.397209018, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  906. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029907, 0.992832005, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  907. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  908. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.397064209, 0.39714998, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  909. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.595685005, 171.196136, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  910. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  911. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, 2.98023224e-06, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  912. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 1.17155194, 171.593292, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  913. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  914. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(3.05175781e-05, 0.575869918, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  915. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 1.17155194, 171.196136, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  916. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  917. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(3.05175781e-05, 0.575869918, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  918. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.198473006, 171.196136, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  919. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  920. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, -0.397209018, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  921. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 0.198476017, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  922. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  923. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0.397109985, -0.397206008, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  924. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.992842019, 171.593292, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  925. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  926. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, 0.397159994, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  927. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 1.17155194, 170.799026, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  928. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  929. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(3.05175781e-05, 0.575869918, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  930. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 0.198477983, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  931. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  932. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(3.05175781e-05, -0.397204041, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  933. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 0.595668972, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  934. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  935. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(3.05175781e-05, -1.30534172e-05, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  936. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 0.992810011, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  937. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  938. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(3.05175781e-05, 0.397127986, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  939. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.595685005, 171.593292, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  940. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  941. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, 2.98023224e-06, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  942. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029907, 0.992810011, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  943. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  944. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.397064209, 0.397127986, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  945. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 1.17155194, 171.196136, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  946. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  947. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(0.397109985, 0.575869918, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  948. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 1.17155194, 171.593292, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  949. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  950. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(0.397109985, 0.575869918, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  951. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(97.8185501, 0.198473006, 171.593292, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 0, 0),})
  952. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  953. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.581504822, -0.397209018, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  954. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029907, 0.595668972, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  955. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  956. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.397064209, -1.30534172e-05, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  957. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 0.992811978, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  958. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  959. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(3.05175781e-05, 0.397129953, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  960. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 0.595668972, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  961. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  962. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0.397109985, -1.30534172e-05, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  963. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 0.198476017, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  964. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  965. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0.397109985, -0.397206008, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  966. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.198473006, 171.196136, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  967. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  968. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, -0.397209018, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  969. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.992842019, 171.593292, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  970. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  971. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, 0.397159994, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  972. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Institutional white"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 1.17155194, 170.799026, 0, 1, 0, -1, 0, 0, 0, 0, 1),Color = Color3.new(0.972549, 0.972549, 0.972549),})
  973. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  974. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1),C1 = CFrame.new(0.397109985, 0.575869918, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  975. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Really blue"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 0.992810011, 170.617462, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 0, 1),})
  976. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  977. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0.397109985, 0.397127986, -0.578704834, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  978. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 0.992810011, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  979. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  980. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0.397109985, 0.397127986, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  981. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.0029907, 0.198476017, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  982. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  983. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.397064209, -0.397206008, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  984. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 0.595668972, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  985. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  986. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(3.05175781e-05, -1.30534172e-05, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  987. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.595685005, 171.196136, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  988. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  989. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, 2.98023224e-06, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  990. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.595685005, 170.799026, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  991. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  992. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, 2.98023224e-06, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  993. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.595685005, 171.593292, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  994. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  995. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, 2.98023224e-06, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  996. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.992842019, 171.196136, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  997. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  998. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, 0.397159994, -3.05175781e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  999. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.198473006, 170.799026, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  1000. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  1001. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, -0.397209018, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  1002. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.4000854, 0.198476017, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  1003. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  1004. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(3.05175781e-05, -0.397206008, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  1005. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("Lime green"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.7971649, 0.595668972, 171.771942, 0, 0, 1, 0, 1, 0, -1, 0, 0),Color = Color3.new(0, 1, 0),})
  1006. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  1007. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0.397109985, -1.30534172e-05, 0.575775146, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  1008. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.992842019, 170.799026, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  1009. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  1010. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, 0.397159994, -0.397140503, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  1011. Part = New("Part",RubiksCube,"Part",{BrickColor = BrickColor.new("New Yeller"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.283656985, 0.283656925),CFrame = CFrame.new(98.9816284, 0.198473006, 171.593292, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(1, 1, 0),})
  1012. Mesh = New("BlockMesh",Part,"Mesh",{Scale = Vector3.new(0.283656865, 1, 1),})
  1013. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.581573486, -0.397209018, 0.397125244, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  1014. local NewInstance = function(instance,parent,properties)
  1015.     local inst = Instance.new(instance,parent)
  1016.     if(properties)then
  1017.         for i,v in next, properties do
  1018.             pcall(function() inst[i] = v end)
  1019.         end
  1020.     end
  1021.     return inst;
  1022. end
  1023. local HW = NewInstance('Weld',char,{Part0=tors,Part1=Handle,C0 = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-65),0,math.rad(-90))})
  1024.  
  1025. function intro()
  1026.     attack = true
  1027.     for i = 0,2,0.1 do
  1028.         swait()
  1029.             rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(55)),.3)
  1030. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-65)),.3)
  1031. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(76)), 0.3)
  1032. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1033.     end
  1034. end
  1035.  
  1036.  
  1037. local idle=0
  1038. local sine = 0
  1039. local change = 1
  1040. local val = 0
  1041. toim = 0
  1042. hum.Animator.Parent = nil
  1043. idleanim=.4
  1044. while true do
  1045. swait()
  1046. sine = sine + change
  1047. local torvel=(root.Velocity*Vector3.new(1,0,1)).magnitude
  1048. local velderp=root.Velocity.y
  1049. hitfloor,posfloor=rayCast(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,char)
  1050. if equipped==true or equipped==false then
  1051. if attack==false then
  1052. idle=idle+1
  1053. else
  1054. idle=0
  1055. end
  1056. if root.Velocity.y > 1 and hitfloor==nil then
  1057. Anim="Jump"
  1058. if attack==false then
  1059. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1060. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1061. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
  1062. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1063. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1064. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1065. end
  1066. elseif root.Velocity.y < -1 and hitfloor==nil then
  1067. Anim="Fall"
  1068. if attack==false then
  1069. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1070. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1071. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1072. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3)
  1073. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
  1074. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1075. end
  1076. elseif torvel<1 and hitfloor~=nil then
  1077. Anim="Idle"
  1078. change = 2
  1079.  
  1080. if attack==false then
  1081. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/20))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1082. tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(25),math.rad(0),math.rad(0)),.3)
  1083. RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
  1084. LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(-90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
  1085. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(65 - 1), math.rad(-7), math.rad(-35)), 0.3)
  1086. LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(90 - 1), math.rad(-7), math.rad(55)), 0.1)
  1087. HW.C0=euler(0,2.57*math.cos(sine/60)/1,0)*cf(0,2.1+1.7,0)* angles(math.rad(55 - 1), math.rad(-7), math.rad(55), 0.1)
  1088. end
  1089.  
  1090. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1091. Anim="Walk"
  1092. change = 1
  1093. if attack==false then
  1094. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  1095. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1096. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40) * math.cos(sine / 7), math.rad(0), math.rad(5)), 0.3)
  1097. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40) * math.cos(sine / 7), math.rad(0), math.rad(-5)), 0.3)
  1098. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1.5,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1099. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1100. HW.C0=euler(0,2.57*math.cos(sine/60)/1,0)*cf(0,2.1+1.7,0)* angles(math.rad(55 - 1), math.rad(-7), math.rad(55*math.cos(sine/60)), 0.1)
  1101. end
  1102. elseif torvel>=22 and hitfloor~=nil then
  1103. Anim="Run"
  1104. change = 2
  1105. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(25),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  1106. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1107. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(55), math.rad(-55), math.rad(90)), 0.3)
  1108. LW.C0=clerp(LW.C0,cf(-0.85,0.5 + 0.1 * math.cos(sine / 60),-0.65)*angles(math.rad(40),math.rad(0),math.rad(90 + 2.5)),.3)
  1109. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/1)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1110. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/1)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
  1111. HW.C0=clerp(HW.C0,cf(0,-1,0)*angles(math.rad(-65),math.rad(0),math.rad(-90)),0.15)
  1112.  
  1113. end
  1114. end
  1115. if 0 < #Effects then
  1116.     for e = 1, #Effects do
  1117.       if Effects[e] ~= nil then
  1118.         local Thing = Effects[e]
  1119.         if Thing ~= nil then
  1120.           local Part = Thing[1]
  1121.           local Mode = Thing[2]
  1122.           local Delay = Thing[3]
  1123.           local IncX = Thing[4]
  1124.           local IncY = Thing[5]
  1125.           local IncZ = Thing[6]
  1126.           if 1 >= Thing[1].Transparency then
  1127.             if Thing[2] == "Block1" then
  1128.               Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1129.               local Mesh = Thing[1].Mesh
  1130.               Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1131.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1132.             elseif Thing[2] == "Block2" then
  1133.               Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  1134.               local Mesh = Thing[7]
  1135.               Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1136.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1137.             elseif Thing[2] == "Block3" then
  1138.               Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  1139.               local Mesh = Thing[7]
  1140.               Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1141.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1142.             elseif Thing[2] == "Cylinder" then
  1143.               local Mesh = Thing[1].Mesh
  1144.               Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1145.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1146.             elseif Thing[2] == "Blood" then
  1147.               local Mesh = Thing[7]
  1148.               Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1149.               Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1150.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1151.             elseif Thing[2] == "Elec" then
  1152.               local Mesh = Thing[1].Mesh
  1153.               Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1154.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1155.             elseif Thing[2] == "Disappear" then
  1156.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1157.             elseif Thing[2] == "Shatter" then
  1158.               Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1159.               Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1160.               Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1161.               Thing[6] = Thing[6] + Thing[5]
  1162.             end
  1163.           else
  1164.             Part.Parent = nil
  1165.             table.remove(Effects, e)
  1166.           end
  1167.         end
  1168.       end
  1169.     end
  1170.   end
  1171. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement