2AreYouMental110

Move Unanchored Parts/Telekinesis FEa0

Apr 21st, 2021 (edited)
165
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- equip the item and click hold on unanchored parts to move them
  2. -- other players cant see the thing your holding
  3. -- original https://www.youtube.com/watch?v=7cVhlqYekuo
  4.  
  5. function sandbox(var,func)
  6.     local env = getfenv(func)
  7.     local newenv = setmetatable({},{
  8.         __index = function(self,k)
  9.             if k=="script" then
  10.                 return var
  11.             else
  12.                 return env[k]
  13.             end
  14.         end,
  15.     })
  16.     setfenv(func,newenv)
  17.     return func
  18. end
  19. cors = {}
  20. mas = Instance.new("Model",game:GetService("Lighting"))
  21. Tool0 = Instance.new("Tool")
  22. Part1 = Instance.new("Part")
  23. CylinderMesh2 = Instance.new("CylinderMesh")
  24. Part3 = Instance.new("Part")
  25. LocalScript4 = Instance.new("LocalScript")
  26. Script5 = Instance.new("Script")
  27. LocalScript6 = Instance.new("LocalScript")
  28. Script7 = Instance.new("Script")
  29. LocalScript8 = Instance.new("LocalScript")
  30. Part9 = Instance.new("Part")
  31. Script10 = Instance.new("Script")
  32. Part11 = Instance.new("Part")
  33. Script12 = Instance.new("Script")
  34. Part13 = Instance.new("Part")
  35. Script14 = Instance.new("Script")
  36. Tool0.Name = "Telekinesis Gun"
  37. Tool0.Parent = mas
  38. Tool0.CanBeDropped = false
  39. Part1.Name = "Handle"
  40. Part1.Parent = Tool0
  41. Part1.Material = Enum.Material.Neon
  42. Part1.BrickColor = BrickColor.new("Cyan")
  43. Part1.Transparency = 1
  44. Part1.Rotation = Vector3.new(0, 15.4200001, 0)
  45. Part1.CanCollide = false
  46. Part1.FormFactor = Enum.FormFactor.Custom
  47. Part1.Size = Vector3.new(1, 0.400000036, 0.300000012)
  48. Part1.CFrame = CFrame.new(-55.2695465, 0.696546972, 0.383156985, 0.96399641, -4.98074878e-05, 0.265921414, 4.79998416e-05, 1, 1.32960558e-05, -0.265921414, -5.30653779e-08, 0.96399641)
  49. Part1.BottomSurface = Enum.SurfaceType.Smooth
  50. Part1.TopSurface = Enum.SurfaceType.Smooth
  51. Part1.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  52. Part1.Position = Vector3.new(-55.2695465, 0.696546972, 0.383156985)
  53. Part1.Orientation = Vector3.new(0, 15.4200001, 0)
  54. Part1.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  55. CylinderMesh2.Parent = Part1
  56. CylinderMesh2.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  57. CylinderMesh2.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  58. Part3.Name = "Shoot"
  59. Part3.Parent = Tool0
  60. Part3.Material = Enum.Material.Neon
  61. Part3.BrickColor = BrickColor.new("Cyan")
  62. Part3.Reflectance = 0.30000001192093
  63. Part3.Transparency = 1
  64. Part3.Rotation = Vector3.new(90.9799957, 0.25999999, -91.409996)
  65. Part3.CanCollide = false
  66. Part3.FormFactor = Enum.FormFactor.Custom
  67. Part3.Size = Vector3.new(0.200000003, 0.25, 0.310000032)
  68. Part3.CFrame = CFrame.new(-54.7998123, 0.774299085, -0.757350147, -0.0245519895, 0.99968797, 0.00460194098, 0.0169109926, 0.00501798885, -0.999844491, -0.999555528, -0.0244703442, -0.0170289185)
  69. Part3.BottomSurface = Enum.SurfaceType.Smooth
  70. Part3.TopSurface = Enum.SurfaceType.Smooth
  71. Part3.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  72. Part3.Position = Vector3.new(-54.7998123, 0.774299085, -0.757350147)
  73. Part3.Orientation = Vector3.new(88.9899979, 164.87999, 73.4700012)
  74. Part3.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  75. LocalScript4.Parent = Tool0
  76. table.insert(cors,sandbox(LocalScript4,function()
  77. -- Variables for services
  78. local render = game:GetService("RunService").RenderStepped
  79. local contextActionService = game:GetService("ContextActionService")
  80. local userInputService = game:GetService("UserInputService")
  81.  
  82. local player = game.Players.LocalPlayer
  83. local mouse = player:GetMouse()
  84. local Tool = script.Parent
  85.  
  86. -- Variables for Module Scripts
  87. local screenSpace = require(Tool:WaitForChild("ScreenSpace"))
  88.  
  89. local connection
  90. -- Variables for character joints
  91.  
  92. local neck, shoulder, oldNeckC0, oldShoulderC0
  93.  
  94. local mobileShouldTrack = true
  95.  
  96. -- Thourough check to see if a character is sitting
  97. local function amISitting(character)
  98.     local t = character.Torso
  99.     for _, part in pairs(t:GetConnectedParts(true)) do
  100.         if part:IsA("Seat") or part:IsA("VehicleSeat") then
  101.             return true
  102.         end
  103.     end
  104. end
  105.  
  106. -- Function to call on renderstepped. Orients the character so it is facing towards
  107. -- the player mouse's position in world space. If character is sitting then the torso
  108. -- should not track
  109. local function frame(mousePosition)
  110.     -- Special mobile consideration. We don't want to track if the user was touching a ui
  111.     -- element such as the movement controls. Just return out of function if so to make sure
  112.     -- character doesn't track
  113.     if not mobileShouldTrack then return end
  114.    
  115.     -- Make sure character isn't swiming. If the character is swimming the following code will
  116.     -- not work well; the character will not swim correctly. Besides, who shoots underwater?
  117.     if player.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then
  118.         local torso = player.Character.Torso
  119.         local head = player.Character.Head
  120.        
  121.         local toMouse = (mousePosition - head.Position).unit
  122.         local angle = math.acos(toMouse:Dot(Vector3.new(0,1,0)))
  123.        
  124.         local neckAngle = angle
  125.    
  126.         -- Limit how much the head can tilt down. Too far and the head looks unnatural
  127.         if math.deg(neckAngle) > 110 then
  128.             neckAngle = math.rad(110)
  129.         end
  130.         neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.pi - neckAngle,math.pi,0)
  131.        
  132.         -- Calculate horizontal rotation
  133.         local arm = player.Character:FindFirstChild("Right Arm")
  134.         local fromArmPos = torso.Position + torso.CFrame:vectorToWorldSpace(Vector3.new(
  135.             torso.Size.X/2 + arm.Size.X/2, torso.Size.Y/2 - arm.Size.Z/2, 0))
  136.         local toMouseArm = ((mousePosition - fromArmPos) * Vector3.new(1,0,1)).unit
  137.         local look = (torso.CFrame.lookVector * Vector3.new(1,0,1)).unit
  138.         local lateralAngle = math.acos(toMouseArm:Dot(look))       
  139.        
  140.         -- Check for rogue math
  141.         if tostring(lateralAngle) == "-1.#IND" then
  142.             lateralAngle = 0
  143.         end    
  144.        
  145.         -- Handle case where character is sitting down
  146.         if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then          
  147.            
  148.             local cross = torso.CFrame.lookVector:Cross(toMouseArm)
  149.             if lateralAngle > math.pi/2 then
  150.                 lateralAngle = math.pi/2
  151.             end
  152.             if cross.Y < 0 then
  153.                 lateralAngle = -lateralAngle
  154.             end
  155.         end
  156.        
  157.         -- Turn shoulder to point to mouse
  158.         shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.pi/2 - angle,math.pi/2 + lateralAngle,0)
  159.        
  160.         -- If not sitting then aim torso laterally towards mouse
  161.         if not amISitting(player.Character) then
  162.             torso.CFrame = CFrame.new(torso.Position, torso.Position + (Vector3.new(
  163.                 mousePosition.X, torso.Position.Y, mousePosition.Z)-torso.Position).unit)
  164.         else
  165.             --print("sitting")     
  166.         end
  167.     end
  168. end
  169.  
  170. -- Function to bind to render stepped if player is on PC
  171. local function pcFrame()
  172.     frame(mouse.Hit.p)
  173. end
  174.  
  175. -- Function to bind to touch moved if player is on mobile
  176. local function mobileFrame(touch, processed)
  177.     -- Check to see if the touch was on a UI element. If so, we don't want to update anything
  178.     if not processed then
  179.         -- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
  180.         -- to create a ray from the camera.
  181.         local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
  182.         local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1))
  183.         nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
  184.         local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y,50)
  185.         farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
  186.         if farPos.magnitude > 900 then
  187.             farPos = farPos.unit * 900
  188.         end
  189.         local ray = Ray.new(nearPos, farPos)
  190.         local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)
  191.        
  192.         -- if a position was found on the ray then update the character's rotation
  193.         if pos then
  194.             frame(pos)
  195.         end
  196.     end
  197. end
  198.  
  199. local oldIcon = nil
  200. -- Function to bind to equip event
  201. local function equip()
  202.     local torso = player.Character.Torso
  203.    
  204.     -- Setup joint variables
  205.     neck = torso.Neck  
  206.     oldNeckC0 = neck.C0
  207.     shoulder = torso:FindFirstChild("Right Shoulder")
  208.     oldShoulderC0 = shoulder.C0
  209.    
  210.     -- Remember old mouse icon and update current
  211.     oldIcon = mouse.Icon
  212.     mouse.Icon = "rbxassetid:// 2184939409"
  213.    
  214.     -- Bind TouchMoved event if on mobile. Otherwise connect to renderstepped
  215.     if userInputService.TouchEnabled then
  216.         connection = userInputService.TouchMoved:connect(mobileFrame)
  217.     else
  218.         connection = render:connect(pcFrame)
  219.     end
  220.    
  221.     -- Bind TouchStarted and TouchEnded. Used to determine if character should rotate
  222.     -- during touch input
  223.     userInputService.TouchStarted:connect(function(touch, processed)
  224.         mobileShouldTrack = not processed
  225.     end)   
  226.     userInputService.TouchEnded:connect(function(touch, processed)
  227.         mobileShouldTrack = false
  228.     end)
  229.    
  230.     -- Fire server's equip event
  231.     game.ReplicatedStorage.ROBLOX_PistolEquipEvent:FireServer()
  232.    
  233.     -- Bind event for when mouse is clicked to fire server's fire event
  234.     mouse.Button1Down:connect(function()
  235.         game.ReplicatedStorage.ROBLOX_PistolFireEvent:FireServer(mouse.Hit.p)
  236.     end)
  237.    
  238.     -- Bind reload event to mobile button and r key
  239.     contextActionService:BindActionToInputTypes("Reload", function()
  240.         game.ReplicatedStorage.ROBLOX_PistolReloadEvent:FireServer()       
  241.     end, true, "")
  242.    
  243.     -- If game uses filtering enabled then need to update server while tool is
  244.     -- held by character.
  245.     if workspace.FilteringEnabled then
  246.         while connection do
  247.             wait()
  248.             game.ReplicatedStorage.ROBLOX_PistolUpdateEvent:FireServer(neck.C0, shoulder.C0)
  249.         end
  250.     end
  251. end
  252.  
  253. -- Function to bind to Unequip event
  254. local function unequip()
  255.     if connection then connection:disconnect() end
  256.     contextActionService:UnbindAction("Reload")
  257.     game.ReplicatedStorage.ROBLOX_PistolUnequipEvent:FireServer()
  258.     mouse.Icon = oldIcon
  259.     neck.C0 = oldNeckC0
  260.     shoulder.C0 = oldShoulderC0
  261. end
  262.  
  263. -- Bind tool events
  264. Tool.Equipped:connect(equip)
  265. Tool.Unequipped:connect(unequip)
  266. end))
  267. Script5.Name = "qPerfectionWeld"
  268. Script5.Parent = Tool0
  269. table.insert(cors,sandbox(Script5,function()
  270. -- Created by Quenty (@Quenty, follow me on twitter).
  271. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  272. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  273.  
  274. --[[ INSTRUCTIONS
  275. - Place in the model
  276. - Make sure model is anchored
  277. - That's it. It will weld the model and all children.
  278.  
  279. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  280. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  281. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  282. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  283. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  284. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  285. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  286. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  287.  
  288. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  289. ]]
  290.  
  291. --[[ DOCUMENTATION
  292. - Will work in tools. If ran more than once it will not create more than one weld.  This is especially useful for tools that are dropped and then picked up again.
  293. - Will work in PBS servers
  294. - Will work as long as it starts out with the part anchored
  295. - Stores the relative CFrame as a CFrame value
  296. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  297. - Utilizes a recursive algorith to find all parts in the model
  298. - Will reweld on script reparent if the script is initially parented to a tool.
  299. - Welds as fast as possible
  300. ]]
  301.  
  302. -- qPerfectionWeld.lua
  303. -- Created 10/6/2014
  304. -- Author: Quenty
  305. -- Version 1.0.3
  306.  
  307. -- Updated 10/14/2014 - Updated to 1.0.1
  308. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  309.  
  310. -- Updated 10/14/2014 - Updated to 1.0.2
  311. --- Fixed bug fix.
  312.  
  313. -- Updated 10/14/2014 - Updated to 1.0.3
  314. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  315.  
  316. local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
  317.  
  318.  
  319. local function CallOnChildren(Instance, FunctionToCall)
  320.     -- Calls a function on each of the children of a certain object, using recursion.  
  321.  
  322.     FunctionToCall(Instance)
  323.  
  324.     for _, Child in next, Instance:GetChildren() do
  325.         CallOnChildren(Child, FunctionToCall)
  326.     end
  327. end
  328.  
  329. local function GetNearestParent(Instance, ClassName)
  330.     -- Returns the nearest parent of a certain class, or returns nil
  331.  
  332.     local Ancestor = Instance
  333.     repeat
  334.         Ancestor = Ancestor.Parent
  335.         if Ancestor == nil then
  336.             return nil
  337.         end
  338.     until Ancestor:IsA(ClassName)
  339.  
  340.     return Ancestor
  341. end
  342.  
  343. local function GetBricks(StartInstance)
  344.     local List = {}
  345.  
  346.     -- if StartInstance:IsA("BasePart") then
  347.     --  List[#List+1] = StartInstance
  348.     -- end
  349.  
  350.     CallOnChildren(StartInstance, function(Item)
  351.         if Item:IsA("BasePart") then
  352.             List[#List+1] = Item;
  353.         end
  354.     end)
  355.  
  356.     return List
  357. end
  358.  
  359. local function Modify(Instance, Values)
  360.     -- Modifies an Instance by using a table.  
  361.  
  362.     assert(type(Values) == "table", "Values is not a table");
  363.  
  364.     for Index, Value in next, Values do
  365.         if type(Index) == "number" then
  366.             Value.Parent = Instance
  367.         else
  368.             Instance[Index] = Value
  369.         end
  370.     end
  371.     return Instance
  372. end
  373.  
  374. local function Make(ClassType, Properties)
  375.     -- Using a syntax hack to create a nice way to Make new items.  
  376.  
  377.     return Modify(Instance.new(ClassType), Properties)
  378. end
  379.  
  380. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  381. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  382.  
  383. local function HasWheelJoint(Part)
  384.     for _, SurfaceName in pairs(Surfaces) do
  385.         for _, HingSurfaceName in pairs(HingSurfaces) do
  386.             if Part[SurfaceName].Name == HingSurfaceName then
  387.                 return true
  388.             end
  389.         end
  390.     end
  391.    
  392.     return false
  393. end
  394.  
  395. local function ShouldBreakJoints(Part)
  396.     --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  397.     --  definitely some edge cases.
  398.  
  399.     if NEVER_BREAK_JOINTS then
  400.         return false
  401.     end
  402.    
  403.     if HasWheelJoint(Part) then
  404.         return false
  405.     end
  406.    
  407.     local Connected = Part:GetConnectedParts()
  408.    
  409.     if #Connected == 1 then
  410.         return false
  411.     end
  412.    
  413.     for _, Item in pairs(Connected) do
  414.         if HasWheelJoint(Item) then
  415.             return false
  416.         elseif not Item:IsDescendantOf(script.Parent) then
  417.             return false
  418.         end
  419.     end
  420.    
  421.     return true
  422. end
  423.  
  424. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  425.     --- Weld's 2 parts together
  426.     -- @param Part0 The first part
  427.     -- @param Part1 The second part (Dependent part most of the time).
  428.     -- @param [JointType] The type of joint. Defaults to weld.
  429.     -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  430.     -- @return The weld created.
  431.  
  432.     JointType = JointType or "Weld"
  433.     local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  434.    
  435.     local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  436.     Modify(NewWeld, {
  437.         Name = "qCFrameWeldThingy";
  438.         Part0  = Part0;
  439.         Part1  = Part1;
  440.         C0     = CFrame.new();--Part0.CFrame:inverse();
  441.         C1     = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  442.         Parent = Part1;
  443.     })
  444.  
  445.     if not RelativeValue then
  446.         RelativeValue = Make("CFrameValue", {
  447.             Parent     = Part1;
  448.             Name       = "qRelativeCFrameWeldValue";
  449.             Archivable = true;
  450.             Value      = NewWeld.C1;
  451.         })
  452.     end
  453.  
  454.     return NewWeld
  455. end
  456.  
  457. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  458.     -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  459.     -- @param MainPart The part to weld the model to (can be in the model).
  460.     -- @param [JointType] The type of joint. Defaults to weld.
  461.     -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  462.    
  463.     for _, Part in pairs(Parts) do
  464.         if ShouldBreakJoints(Part) then
  465.             Part:BreakJoints()
  466.         end
  467.     end
  468.    
  469.     for _, Part in pairs(Parts) do
  470.         if Part ~= MainPart then
  471.             WeldTogether(MainPart, Part, JointType, MainPart)
  472.         end
  473.     end
  474.  
  475.     if not DoNotUnanchor then
  476.         for _, Part in pairs(Parts) do
  477.             Part.Anchored = false
  478.         end
  479.         MainPart.Anchored = false
  480.     end
  481. end
  482.  
  483. local function PerfectionWeld()
  484.     local Tool = GetNearestParent(script, "Tool")
  485.  
  486.     local Parts = GetBricks(script.Parent)
  487.     local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
  488.  
  489.     if PrimaryPart then
  490.         WeldParts(Parts, PrimaryPart, "Weld", false)
  491.     else
  492.         warn("qWeld - Unable to weld part")
  493.     end
  494.    
  495.     return Tool
  496. end
  497.  
  498. local Tool = PerfectionWeld()
  499.  
  500.  
  501. if Tool and script.ClassName == "Script" then
  502.     --- Don't bother with local scripts
  503.  
  504.     script.Parent.AncestryChanged:connect(function()
  505.         PerfectionWeld()
  506.     end)
  507. end
  508.  
  509. -- Created by Quenty (@Quenty, follow me on twitter).
  510.  
  511. end))
  512. LocalScript6.Name = "Animate"
  513. LocalScript6.Parent = Tool0
  514. table.insert(cors,sandbox(LocalScript6,function()
  515. local arms = nil
  516. local torso = nil
  517. local welds = {}
  518. local Tool = script.Parent
  519. local neck = nil
  520. local orginalC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  521.  
  522. function Equip(mouse)
  523. wait(0.01)
  524. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  525. head = Tool.Parent:FindFirstChild("Head")
  526. torso = Tool.Parent:FindFirstChild("Torso")
  527. if neck == nil then
  528. neck = Tool.Parent:FindFirstChild("Torso").Neck
  529. end
  530. if arms ~= nil and torso ~= nil then
  531. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  532. if sh ~= nil then
  533. local yes = true
  534. if yes then
  535. yes = false
  536. sh[1].Part1 = nil
  537. sh[2].Part1 = nil
  538. local weld1 = Instance.new("Weld")
  539. weld1.Part0 = head
  540. weld1.Parent = head
  541. weld1.Part1 = arms[1]
  542. welds[1] = weld1
  543. local weld2 = Instance.new("Weld")
  544. weld2.Part0 = head
  545. weld2.Parent = head
  546. weld2.Part1 = arms[2]
  547. welds[2] = weld2
  548. -------------------------here
  549. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  550. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  551.     mouse.Move:connect(function ()
  552.         --local Direction = Tool.Direction.Value
  553.         local Direction = mouse.Hit.p
  554.         local b = head.Position.Y-Direction.Y
  555.         local dist = (head.Position-Direction).magnitude
  556.         local answer = math.asin(b/dist)
  557.         neck.C0=orginalC0*CFrame.fromEulerAnglesXYZ(answer,0,0)
  558.         wait(0.1)
  559.     end)end
  560. else
  561. print("sh")
  562. end
  563. else
  564. print("arms")
  565. end
  566. end
  567.  
  568. function Unequip(mouse)
  569. if arms ~= nil and torso ~= nil then
  570. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  571. if sh ~= nil then
  572. local yes = true
  573. if yes then
  574. yes = false
  575.     neck.C0 = orginalC0
  576.  
  577. sh[1].Part1 = arms[1]
  578. sh[2].Part1 = arms[2]
  579. welds[1].Parent = nil
  580. welds[2].Parent = nil
  581. end
  582. else
  583. print("sh")
  584. end
  585. else
  586. print("arms")
  587. end
  588. end
  589. Tool.Equipped:connect(Equip)
  590. Tool.Unequipped:connect(Unequip)
  591.  
  592. function Animate()
  593. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  594.     if Tool.AnimateValue.Value == "Shoot" then
  595.         local weld1 = welds[1]
  596.         local weld2 = welds[2]
  597.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  598.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  599.         wait(0.00001)
  600.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.05, math.rad(-90))
  601.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  602.         wait(0.00001)
  603.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.1, math.rad(-90))
  604.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  605.         wait(0.00001)
  606.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.3, math.rad(-90))
  607.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  608.         wait(0.00001)
  609.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.35, math.rad(-90))
  610.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  611.         wait(0.00001)
  612.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  613.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  614.         wait(0.00001)
  615.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  616.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)   
  617.         Tool.AnimateValue.Value = "None"
  618.     end
  619.     if Tool.AnimateValue.Value == "Reload" then
  620.         local weld1 = welds[1]
  621.         local weld2 = welds[2]
  622.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  623.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  624.         wait(0.0001)
  625.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  626.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  627.         wait(0.0001)
  628.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  629.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  630.         wait(0.0001)
  631.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  632.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-100), math.rad(-15), 0)
  633.         wait(0.0001)
  634.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  635.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-105), math.rad(-15), 0)
  636.         wait(0.0001)
  637.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  638.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  639.         wait(0.0001)
  640.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  641.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  642.         wait(0.0001)
  643.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.45, math.rad(-90))
  644.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  645.         wait(0.0001)
  646.         weld1.C1 = CFrame.new(-0.5+1.5, 0.9, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.5, math.rad(-90))
  647.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  648.         wait(0.0001)
  649.         weld1.C1 = CFrame.new(-0.5+1.5, 1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.55, math.rad(-90))
  650.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  651.         wait(0.0001)
  652.         weld1.C1 = CFrame.new(-0.5+1.5, 1.1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.57, math.rad(-90))
  653.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  654.         wait(0.0001)
  655.         weld1.C1 = CFrame.new(-0.5+1.5, 1.2, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  656.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  657.         wait(0.0001)
  658.         weld1.C1 = CFrame.new(-0.5+1.5, 1.3, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  659.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  660.         wait(0.0001)
  661.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  662.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)   
  663.         Tool.AnimateValue.Value = "None"
  664.     end
  665. end
  666.  
  667. Tool.AnimateValue.Changed:connect(Animate)
  668.  
  669. end))
  670. Script7.Name = "LineConnect"
  671. Script7.Parent = Tool0
  672. Script7.Disabled = true
  673. table.insert(cors,sandbox(Script7,function()
  674. wait()
  675. local check = script.Part2
  676. local part1 = script.Part1.Value
  677. local part2 = script.Part2.Value
  678. local parent = script.Par.Value
  679. local color = script.Color
  680. local line = Instance.new("Part")
  681. line.TopSurface = 0
  682. line.BottomSurface = 0
  683. line.Reflectance = .5
  684. line.Name = "Laser"
  685. line.Transparency = 0.6
  686. line.Locked = true
  687. line.CanCollide = false
  688. line.Anchored = true
  689. line.formFactor = 0
  690. line.Size = Vector3.new(0.4,0.4,1)
  691. local mesh = Instance.new("BlockMesh")
  692. mesh.Parent = line
  693. while true do
  694.     if (check.Value==nil) then break end
  695.     if (part1==nil or part2==nil or parent==nil) then break end
  696.     if (part1.Parent==nil or part2.Parent==nil) then break end
  697.     if (parent.Parent==nil) then break end
  698.     local lv = CFrame.new(part1.Position,part2.Position)
  699.     local dist = (part1.Position-part2.Position).magnitude
  700.     line.Parent = parent
  701.     line.Material = "Neon"
  702.     line.BrickColor = color.Value.BrickColor
  703.     line.Reflectance = color.Value.Reflectance
  704.     line.Transparency = "0.2"
  705.     line.CFrame = CFrame.new(part1.Position+lv.lookVector*dist/2)
  706.     line.CFrame = CFrame.new(line.Position,part2.Position)
  707.     mesh.Scale = Vector3.new(.25,.25,dist)
  708.     wait()
  709. end
  710. line:remove()
  711. script:remove()
  712. end))
  713. LocalScript8.Name = "MainScript"
  714. LocalScript8.Parent = Tool0
  715. table.insert(cors,sandbox(LocalScript8,function()
  716. --Physics gun created by Killersoldier45
  717. wait()
  718. tool = script.Parent
  719. lineconnect = tool.LineConnect
  720. object = nil
  721. mousedown = false
  722. found = false
  723. BP = Instance.new("BodyPosition")
  724. BP.maxForce = Vector3.new(math.huge*math.huge,math.huge*math.huge,math.huge*math.huge) --pwns everyone elses bodyposition
  725. BP.P = BP.P*10 --faster movement. less bounceback.
  726. dist = nil
  727. point = Instance.new("Part")
  728. point.Locked = true
  729. point.Anchored = true
  730. point.formFactor = 0
  731. point.Shape = 0
  732. point.Material = 'Neon'
  733. point.BrickColor = BrickColor.new("Toothpaste")
  734. point.Size = Vector3.new(1,1,1)
  735. point.CanCollide = false
  736. local mesh = Instance.new("SpecialMesh")
  737. mesh.MeshType = "Sphere"
  738. mesh.Scale = Vector3.new(.2,.2,.2)
  739. mesh.Parent = point
  740. handle = tool.Shoot
  741. front = tool.Shoot
  742. color = tool.Shoot
  743. objval = nil
  744. local hooked = false
  745. local hookBP = BP:clone()
  746. hookBP.maxForce = Vector3.new(30000,30000,30000)
  747.  
  748. function LineConnect(part1,part2,parent)
  749.     local p1 = Instance.new("ObjectValue")
  750.     p1.Value = part1
  751.     p1.Name = "Part1"
  752.     local p2 = Instance.new("ObjectValue")
  753.     p2.Value = part2
  754.     p2.Name = "Part2"
  755.     local par = Instance.new("ObjectValue")
  756.     par.Value = parent
  757.     par.Name = "Par"
  758.     local col = Instance.new("ObjectValue")
  759.     col.Value = color
  760.     col.Name = "Color"
  761.     local s = lineconnect:clone()
  762.     s.Disabled = false
  763.     p1.Parent = s
  764.     p2.Parent = s
  765.     par.Parent = s
  766.     col.Parent = s
  767.     s.Parent = workspace
  768.     if (part2==object) then
  769.         objval = p2
  770.     end
  771. end
  772.  
  773. function onButton1Down(mouse)
  774.     if (mousedown==true) then return end
  775.     mousedown = true
  776.     coroutine.resume(coroutine.create(function()
  777.         local p = point:clone()
  778.         p.Parent = tool
  779.         LineConnect(front,p,workspace)
  780.         while (mousedown==true) do
  781.             p.Parent = tool
  782.             if (object==nil) then
  783.                 if (mouse.Target==nil) then
  784.                     local lv = CFrame.new(front.Position,mouse.Hit.p)
  785.                     p.CFrame = CFrame.new(front.Position+(lv.lookVector*1000))
  786.                 else
  787.                     p.CFrame = CFrame.new(mouse.Hit.p)
  788.                 end
  789.             else
  790.                 LineConnect(front,object,workspace)
  791.                 break
  792.             end
  793.             wait()
  794.         end
  795.         p:remove()
  796.     end))
  797.     while (mousedown==true) do
  798.         if (mouse.Target~=nil) then
  799.             local t = mouse.Target
  800.             if (t.Anchored==false) then
  801.                 object = t
  802.                 dist = (object.Position-front.Position).magnitude
  803.                 break
  804.             end
  805.         end
  806.         wait()
  807.     end
  808.     while (mousedown==true) do
  809.         if (object.Parent==nil) then break end
  810.         local lv = CFrame.new(front.Position,mouse.Hit.p)
  811.         BP.Parent = object
  812.         BP.position = front.Position+lv.lookVector*dist
  813.         wait()
  814.     end
  815.     BP:remove()
  816.     object = nil
  817.     objval.Value = nil
  818. end
  819.  
  820. function onKeyDown(key,mouse)
  821.     local key = key:lower()
  822.     local yesh = false
  823.     if (key=="q") then
  824.         if (dist>=5) then
  825.             dist = dist-5
  826.         end
  827.     end
  828.     if key == "t" then
  829.     if (object==nil) then return end
  830.     for _,v in pairs(object:children()) do
  831.     if v.className == "BodyGyro" then
  832.     return nil
  833.     end
  834.     end
  835.     BG = Instance.new("BodyGyro")
  836.     BG.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  837.     BG.cframe = CFrame.new(object.CFrame.p)
  838.     BG.Parent = object
  839.     repeat wait() until(object.CFrame == CFrame.new(object.CFrame.p))
  840.     BG.Parent = nil
  841.     if (object==nil) then return end
  842.     for _,v in pairs(object:children()) do
  843.     if v.className == "BodyGyro" then
  844.     v.Parent = nil
  845.     end
  846.     end
  847.     object.Velocity = Vector3.new(0,0,0)
  848.     object.RotVelocity = Vector3.new(0,0,0)
  849.     end
  850.     if (key=="e") then
  851.         dist = dist+5
  852.     end
  853.     if (string.byte(key)==27) then
  854.         if (object==nil) then return end
  855.         local e = Instance.new("Explosion")
  856.         e.Parent = workspace
  857.         e.Position = object.Position
  858.         color.BrickColor = BrickColor.Black()
  859.         point.BrickColor = BrickColor.White()
  860.         wait(.48)
  861.         color.BrickColor = BrickColor.White()
  862.         point.BrickColor = BrickColor.Black()
  863.     end
  864.     if (key=="") then
  865.         if not hooked then
  866.         if (object==nil) then return end
  867.         hooked = true
  868.         hookBP.position = object.Position
  869.         if tool.Parent:findFirstChild("Torso") then
  870.         hookBP.Parent = tool.Parent.Torso
  871.         if dist ~= (object.Size.x+object.Size.y+object.Size.z)+5 then
  872.         dist = (object.Size.x+object.Size.y+object.Size.z)+5
  873.         end
  874.         end
  875.         else
  876.         hooked = false
  877.         hookBP.Parent = nil
  878.         end
  879.     end
  880.     if (key=="r") then
  881.         if (object==nil) then return end
  882.         color.BrickColor = BrickColor.new("Toothpaste")
  883.         point.BrickColor = BrickColor.new("Toothpaste")
  884.         object.Parent = nil
  885.         wait(.48)
  886.         color.BrickColor = BrickColor.new("Toothpaste")
  887.         point.BrickColor = BrickColor.new("Toothpaste")
  888.     end
  889.     if (key=="x") then
  890.     if (object==nil) then return end
  891.     local New = object:clone()
  892.     New.Parent = object.Parent
  893.     for _,v in pairs(New:children()) do
  894.     if v.className == "BodyPosition" or v.className == "BodyGyro" then
  895.     v.Parent = nil
  896.     end
  897.     end
  898.     object = New
  899.     mousedown = false
  900.     mousedown = true
  901.     LineConnect(front,object,workspace)
  902.         while (mousedown==true) do
  903.         if (object.Parent==nil) then break end
  904.         local lv = CFrame.new(front.Position,mouse.Hit.p)
  905.         BP.Parent = object
  906.         BP.position = front.Position+lv.lookVector*dist
  907.         wait()
  908.     end
  909.     BP:remove()
  910.     object = nil
  911.     objval.Value = nil
  912.     end
  913.     if (key=="c") then
  914.         local Cube = Instance.new("Part")
  915.         Cube.Locked = true
  916.         Cube.Size = Vector3.new(4,4,4)
  917.         Cube.formFactor = 0
  918.         Cube.TopSurface = 0
  919.         Cube.BottomSurface = 0
  920.         Cube.Name = "WeightedStorageCube"
  921.         Cube.Parent = workspace
  922.         Cube.CFrame = CFrame.new(mouse.Hit.p) + Vector3.new(0,2,0)
  923.         for i = 0,5 do
  924.             local Decal = Instance.new("Decal")
  925.             Decal.Texture = "http://www.roblox.com/asset/?id=2662260"
  926.             Decal.Face = i
  927.             Decal.Name = "WeightedStorageCubeDecal"
  928.             Decal.Parent = Cube
  929.         end
  930.     end
  931.     if (key=="") then
  932.         if dist ~= 15 then
  933.             dist = 15
  934.         end
  935.     end
  936. end
  937.  
  938. function onEquipped(mouse)
  939.     keymouse = mouse
  940.     local char = tool.Parent
  941.     human = char.Humanoid
  942.     human.Changed:connect(function() if (human.Health==0) then mousedown = false BP:remove() point:remove() tool:remove() end end)
  943.     mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  944.     mouse.Button1Up:connect(function() mousedown = false end)
  945.     mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
  946.     mouse.Icon = "rbxassetid://2184939409"
  947. end
  948.  
  949. tool.Equipped:connect(onEquipped)
  950. end))
  951. Part9.Name = "GlowPart"
  952. Part9.Parent = Tool0
  953. Part9.Material = Enum.Material.Neon
  954. Part9.BrickColor = BrickColor.new("Cyan")
  955. Part9.Transparency = 0.5
  956. Part9.Rotation = Vector3.new(0, -89.5899963, 0)
  957. Part9.Shape = Enum.PartType.Cylinder
  958. Part9.Size = Vector3.new(1.20000005, 0.649999976, 2)
  959. Part9.CFrame = CFrame.new(-54.8191681, 0.773548007, -0.0522949994, 0.00736002205, 4.68389771e-11, -0.999974668, 4.72937245e-11, 1, 1.41590961e-10, 0.999974668, 5.09317033e-11, 0.00736002252)
  960. Part9.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  961. Part9.Position = Vector3.new(-54.8191681, 0.773548007, -0.0522949994)
  962. Part9.Orientation = Vector3.new(0, -89.5799942, 0)
  963. Part9.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  964. Script10.Name = "Glow Script"
  965. Script10.Parent = Part9
  966. table.insert(cors,sandbox(Script10,function()
  967. while true do
  968. wait(0.05)
  969. script.Parent.Transparency = .5
  970. wait(0.05)
  971. script.Parent.Transparency = .6
  972. wait(0.05)
  973. script.Parent.Transparency = .7
  974. wait(0.05)
  975. script.Parent.Transparency = .8
  976. wait(0.05)
  977. script.Parent.Transparency = .9
  978. wait(0.05)
  979. script.Parent.Transparency = .8
  980. wait(0.05)
  981. script.Parent.Transparency = .7
  982. wait(0.05)
  983. script.Parent.Transparency = .6
  984. wait(0.05)
  985. script.Parent.Transparency = .5
  986. end
  987.  
  988. end))
  989. Part11.Name = "GlowPart"
  990. Part11.Parent = Tool0
  991. Part11.Material = Enum.Material.Neon
  992. Part11.BrickColor = BrickColor.new("Cyan")
  993. Part11.Transparency = 0.5
  994. Part11.Rotation = Vector3.new(-89.3799973, -55.7399979, -89.25)
  995. Part11.Size = Vector3.new(0.280000001, 0.25999999, 0.200000003)
  996. Part11.CFrame = CFrame.new(-54.9808807, 0.99843204, 0.799362957, 0.00736002205, 0.562958956, -0.826454222, 4.72937245e-11, 0.826475084, 0.56297338, 0.999974668, -0.00414349511, 0.00608287565)
  997. Part11.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  998. Part11.Position = Vector3.new(-54.9808807, 0.99843204, 0.799362957)
  999. Part11.Orientation = Vector3.new(-34.2599983, -89.5799942, 0)
  1000. Part11.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1001. Script12.Name = "Glow Script"
  1002. Script12.Parent = Part11
  1003. table.insert(cors,sandbox(Script12,function()
  1004. while true do
  1005. wait(0.05)
  1006. script.Parent.Transparency = .5
  1007. wait(0.05)
  1008. script.Parent.Transparency = .6
  1009. wait(0.05)
  1010. script.Parent.Transparency = .7
  1011. wait(0.05)
  1012. script.Parent.Transparency = .8
  1013. wait(0.05)
  1014. script.Parent.Transparency = .9
  1015. wait(0.05)
  1016. script.Parent.Transparency = .8
  1017. wait(0.05)
  1018. script.Parent.Transparency = .7
  1019. wait(0.05)
  1020. script.Parent.Transparency = .6
  1021. wait(0.05)
  1022. script.Parent.Transparency = .5
  1023. end
  1024.  
  1025. end))
  1026. Part13.Name = "GlowPart"
  1027. Part13.Parent = Tool0
  1028. Part13.Material = Enum.Material.Neon
  1029. Part13.BrickColor = BrickColor.new("Cyan")
  1030. Part13.Transparency = 0.5
  1031. Part13.Rotation = Vector3.new(95.1500015, -53.8199997, 98.0799942)
  1032. Part13.Size = Vector3.new(0.280000001, 0.25999999, 0.200000003)
  1033. Part13.CFrame = CFrame.new(-54.5909271, 0.978429973, 0.799362957, -0.0830051303, -0.584483683, -0.807150841, 0.0241250042, 0.808528602, -0.58796227, 0.996258855, -0.0682764053, -0.0530113392)
  1034. Part13.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1035. Part13.Position = Vector3.new(-54.5909271, 0.978429973, 0.799362957)
  1036. Part13.Orientation = Vector3.new(36.0099983, -93.7599945, 1.70999992)
  1037. Part13.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1038. Script14.Name = "Glow Script"
  1039. Script14.Parent = Part13
  1040. table.insert(cors,sandbox(Script14,function()
  1041. while true do
  1042. wait(0.05)
  1043. script.Parent.Transparency = .5
  1044. wait(0.05)
  1045. script.Parent.Transparency = .6
  1046. wait(0.05)
  1047. script.Parent.Transparency = .7
  1048. wait(0.05)
  1049. script.Parent.Transparency = .8
  1050. wait(0.05)
  1051. script.Parent.Transparency = .9
  1052. wait(0.05)
  1053. script.Parent.Transparency = .8
  1054. wait(0.05)
  1055. script.Parent.Transparency = .7
  1056. wait(0.05)
  1057. script.Parent.Transparency = .6
  1058. wait(0.05)
  1059. script.Parent.Transparency = .5
  1060. end
  1061.  
  1062. end))
  1063. for i,v in pairs(mas:GetChildren()) do
  1064.     v.Parent = game:GetService("Players").LocalPlayer.Backpack
  1065.     pcall(function() v:MakeJoints() end)
  1066. end
  1067. mas:Destroy()
  1068. for i,v in pairs(cors) do
  1069.     spawn(function()
  1070.         pcall(v)
  1071.     end)
  1072. end
RAW Paste Data Copied