Advertisement
danielaust

Phy gun

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