Advertisement
reni11029

Physics Gun but in pastebin

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