Advertisement
okban

meh

Sep 24th, 2017
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.99 KB | None | 0 0
  1. --Made by: KYLETHORNTON
  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. SpecialMesh2 = Instance.new("SpecialMesh")
  21. Decal3 = Instance.new("Decal")
  22. Sound4 = Instance.new("Sound")
  23. Sound5 = Instance.new("Sound")
  24. BoolValue6 = Instance.new("BoolValue")
  25. Animation7 = Instance.new("Animation")
  26. Animation8 = Instance.new("Animation")
  27. LocalScript9 = Instance.new("LocalScript")
  28. LocalScript10 = Instance.new("LocalScript")
  29. Script11 = Instance.new("Script")
  30. LocalScript12 = Instance.new("LocalScript")
  31. Script13 = Instance.new("Script")
  32. Animation14 = Instance.new("Animation")
  33. Part15 = Instance.new("Part")
  34. Script16 = Instance.new("Script")
  35. Tool0.Name = "Kyle's BanHammer V1.2"
  36. Tool0.Parent = mas
  37. Tool0.TextureId = "http://www.roblox.com/asset/?id=10684453"
  38. Tool0.GripPos = Vector3.new(0, -1, 0)
  39. Tool0.CanBeDropped = false
  40. Part1.Name = "Handle"
  41. Part1.Parent = Tool0
  42. Part1.Rotation = Vector3.new(87.8300018, -47.3499985, 90.0199966)
  43. Part1.Locked = true
  44. Part1.Size = Vector3.new(1, 6, 1)
  45. Part1.CFrame = CFrame.new(15.2521076, 147.151108, 220.42746, -0.000203687698, -0.677491486, -0.735530555, 0.0381333232, 0.734990358, -0.677004457, 0.999272704, -0.0281861257, 0.0256852917)
  46. Part1.Position = Vector3.new(15.2521076, 147.151108, 220.42746)
  47. Part1.Orientation = Vector3.new(42.6100006, -88, 2.97000003)
  48. SpecialMesh2.Parent = Part1
  49. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=10604848"
  50. SpecialMesh2.Scale = Vector3.new(0.5, 0.5, 0.5)
  51. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=10605252"
  52. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  53. SpecialMesh2.Scale = Vector3.new(0.5, 0.5, 0.5)
  54. Decal3.Parent = Part1
  55. Decal3.Texture = "http://www.roblox.com/asset/?id=10605252"
  56. Decal3.Face = Enum.NormalId.Back
  57. Sound4.Name = "Homerun"
  58. Sound4.Parent = Part1
  59. Sound4.SoundId = "http://www.roblox.com/asset/?id=21343225"
  60. Sound4.Volume = 0
  61. Sound5.Name = "Whack"
  62. Sound5.Parent = Part1
  63. Sound5.SoundId = "http://www.roblox.com/asset/?id=10730819"
  64. Sound5.Volume = 1
  65. BoolValue6.Name = "MouseClick"
  66. BoolValue6.Parent = Tool0
  67. Animation7.Name = "TwoHandAnim"
  68. Animation7.Parent = Tool0
  69. Animation7.AnimationId = "http://www.roblox.com/Asset?ID=48138189"
  70. Animation8.Name = "Whack"
  71. Animation8.Parent = Tool0
  72. Animation8.AnimationId = "http://www.roblox.com/Asset?ID=32659706"
  73. LocalScript9.Name = "_CamShake"
  74. LocalScript9.Parent = Tool0
  75. LocalScript9.Disabled = true
  76. table.insert(cors,sandbox(LocalScript9,function()
  77. local cam = game.Workspace.CurrentCamera
  78. for i = 1, 5 do
  79. wait()
  80. local cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p --* CFrame.fromEulerAnglesXYZ(math.random(-10, 10)/10, math.random(-10, 10)/10, 0)
  81. local cam_scroll = (cam.CoordinateFrame.p - cam.Focus.p).magnitude
  82. local ncf = CFrame.new(cam.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(math.random(-10, 10)/40, math.random(-10, 10)/40, 0)
  83. cam.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll)
  84. end
  85. script:remove()
  86.  
  87. end))
  88. LocalScript10.Name = "_EVT"
  89. LocalScript10.Parent = Tool0
  90. table.insert(cors,sandbox(LocalScript10,function()
  91. script.Parent.Equipped:connect(function(mouse)
  92. mouse.Button1Down:connect(function()
  93. script.Parent.MouseClick.Value = not script.Parent.MouseClick.Value
  94. end)
  95. end)
  96. end))
  97. Script11.Name = "_SoundDetection"
  98. Script11.Parent = Tool0
  99. table.insert(cors,sandbox(Script11,function()
  100. hammer = script.Parent.Handle
  101. local HomerunSound = Instance.new("Sound")
  102. HomerunSound.SoundId = "http://www.roblox.com/asset/?id=21343225"
  103. HomerunSound.Parent = hammer
  104. HomerunSound.Volume = 0.5
  105. HomerunSound.Name = "Homerun"
  106. local WhackSound = Instance.new("Sound")
  107. WhackSound.SoundId = "http://www.roblox.com/asset/?id=10730819"
  108. WhackSound.Parent = hammer
  109. WhackSound.Volume = 1
  110. WhackSound.Name = "Whack"
  111. hammer.ChildAdded:connect(function(Child)
  112. wait()
  113. if Child.className == "StringValue" then
  114. if Child.Name == "HomerunSound" then
  115. HomerunSound:Play()
  116. elseif Child.Name == "WhackSound" then
  117. WhackSound:Play()
  118. end
  119. Child:Remove()
  120. end
  121. end)
  122. end))
  123. LocalScript12.Name = "_Main"
  124. LocalScript12.Parent = Tool0
  125. table.insert(cors,sandbox(LocalScript12,function()
  126. --Credits: xLEGOx for the first creation of the hammer, Luckymaxer for fixing it, BLOX31 for the ideas and animation, gkku for visual design, sounds, and various fixes
  127. --player
  128. player = nil
  129. --selected
  130. selected = false
  131. homerunning = false
  132. whacking = false
  133. --save shoulders
  134. RSH, LSH = nil, nil
  135. anim = "none"
  136. --grip
  137. --welds
  138. --what anim
  139. local TwoHandAnim
  140. local HomeRunner
  141. local Whacker
  142. --create the dustcloud object
  143. --set variables
  144. hammer = script.Parent.Handle
  145. --[[local msh = Instance.new("SpecialMesh")
  146. msh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  147. msh.MeshType = 5
  148. msh.Parent = prt]]
  149.  
  150. ----- show version ----------
  151. script.Parent.Name = "BanHammer V1.1"
  152. ---------------------------------
  153.  
  154. function GetFigures(Parent, Part)
  155. for i, v in pairs(Parent:GetChildren()) do
  156. GetFigures(v, Part)
  157. if v.className == "Humanoid" then
  158. if v == script.Parent.Parent:findFirstChild("Humanoid") == false then
  159. if v.Parent:findFirstChild("Torso") then
  160. if v.Parent:findFirstChild("Torso"):IsA("BasePart") then
  161. if v.Parent:findFirstChild("Torso").Position.x < Part.Position.x + Part.Size.x / 2
  162. and v.Parent:findFirstChild("Torso").Position.x > Part.Position.x - Part.Size.x / 2
  163. and v.Parent:findFirstChild("Torso").Position.y < Part.Position.y + Part.Size.y / 2
  164. and v.Parent:findFirstChild("Torso").Position.y > Part.Position.y - Part.Size.y / 2
  165. and v.Parent:findFirstChild("Torso").Position.z < Part.Position.z + Part.Size.z / 2
  166. and v.Parent:findFirstChild("Torso").Position.z > Part.Position.z - Part.Size.z / 2 then
  167. v.Sit = true
  168. end
  169. if (Part.Position - v.Parent:findFirstChild("Torso").Position).magnitude < 10 then
  170. v.Sit = true
  171. end
  172. end
  173. end
  174. end
  175. end
  176. end
  177. end
  178. function Raycast(Pos, Dir, Max, Ignore)
  179. return game:GetService("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  180. end
  181. function WaitForChild(obj, ch_n)
  182. local t = time()
  183. while not obj:FindFirstChild(ch_n) and time() - t < 10 do wait(0.1) end
  184. return obj:FindFirstChild(ch_n)
  185. end
  186.  
  187. --onselected, save shoulders and get player
  188. script.Parent.Equipped:connect(function()
  189. TwoHandAnim = script.Parent.Parent:findFirstChild("Humanoid"):LoadAnimation(script.Parent.TwoHandAnim)
  190. HomeRunner = script.Parent.Parent:findFirstChild("Humanoid"):LoadAnimation(script.Parent.HomeRun)
  191. Whacker = script.Parent.Parent:findFirstChild("Humanoid"):LoadAnimation(script.Parent.Whack)
  192. repeat wait() until TwoHandAnim ~= nil and HomeRunner ~= nil and Whacker ~= nil
  193. if selected then return end
  194. selected = true
  195. TwoHandAnim:Play()
  196. end)
  197.  
  198. --griptcf = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-math.pi/2+0.5, 0, 0)
  199.  
  200. script.Parent.Unequipped:connect(function()
  201. selected = false
  202. if TwoHandAnim ~= nil then
  203. TwoHandAnim:Stop()
  204. end
  205. if HomeRunner ~= nil then
  206. HomeRunner:Stop()
  207. end
  208. if Whacker ~= nil then
  209. Whacker:Stop()
  210. end
  211. end)
  212.  
  213. function HomeRunHit(part)
  214. if part == nil then return end
  215. if part.Parent == nil then return end
  216. local h = (part.Parent or game):FindFirstChild("Humanoid") --or findfirstchild optimization
  217. if h then
  218. if h == script.Parent.Parent:findFirstChild("Humanoid") == false then
  219. --game.SoundService.Bomb:Play()
  220. -- hammer.Homerun:Play()
  221. hrs = Instance.new("StringValue")
  222. hrs.Name = "HomerunSound"
  223. hrs.Parent = hammer
  224. h.Sit = true
  225. h.Parent.Torso.Velocity = (CFrame.new(hammer.Position, h.Parent.Torso.Position).lookVector * 200) + Vector3.new(0, 100, 0)
  226. h.Parent.Torso.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  227. end
  228. end
  229. end
  230.  
  231. function HomeRun()
  232. if homerunning == false then
  233. homerunning = true
  234. anim = "homerun"
  235. TwoHandAnim:Stop()
  236. HomeRunner:Play()
  237. --start HomeRunhit connection--
  238. local con = hammer.Touched:connect(HomeRunHit)
  239. ----------------------------------------
  240. wait(.6)
  241. HomeRunner:Stop()
  242. if selected == true then
  243. TwoHandAnim:Play()
  244. end
  245. ----end HomeRun connection---
  246. con:disconnect()
  247. -- wait(0.15)
  248. homerunning = false
  249. end
  250. end
  251. function Whack()
  252. if homerunning == false then
  253. anim = "norm"
  254. TwoHandAnim:Stop()
  255. Whacker:Play()
  256. -- hammer.Whack:Play()
  257. --insert camshake and hit nearby people
  258. for _, p in pairs(game.Players:GetChildren()) do
  259. if p.Character == script.Parent.Parent == false then
  260. if p.Character:FindFirstChild("Torso") then
  261. if (p.Character.Torso.Position - (hammer.CFrame*CFrame.new(0, 3, 0)).p).magnitude < 15 then
  262. local s = script.Parent._CamShake:clone()
  263. s.Disabled = false
  264. s.Parent = p.Backpack
  265. if p ~= player then
  266. -- p.Character.Humanoid.Sit = true
  267. -- delay(0.1, function() p.Character.Humanoid.Jump = true end)
  268. p.Character.Torso.RotVelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  269. end
  270. end
  271. end
  272. end
  273. end
  274. --add dust cloud
  275. delay(0.25, function()
  276. if anim == "norm" then
  277. if selected == true then
  278. whacking = true
  279. p=Instance.new("Part")
  280. p.CanCollide = false
  281. p.Transparency = 1
  282. p.Parent = script.Parent.Parent
  283. p.formFactor = "Custom"
  284. p.Size = Vector3.new(0.2, 0.2, 0.2)
  285. p.Anchored = true
  286. p.CFrame = hammer.CFrame - Vector3.new(0, script.Parent.Parent:findFirstChild("Torso").Size.y/2, 0) + script.Parent.Parent:findFirstChild("Torso").CFrame.lookVector * ((hammer.Size.y / 2) - p.Size.z)
  287. p.CFrame = CFrame.new(p.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  288. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(-math.pi/2, 0, -math.pi/2)
  289. Hit, Pos = Raycast(p.Position, p.CFrame.lookVector, 4, script.Parent.Parent)
  290. if Hit ~= nil then
  291. if homerunning == false then
  292. delay(0.35, function()
  293. w = Instance.new("StringValue")
  294. w.Name = "WhackSound"
  295. w.Parent = hammer
  296. end)
  297. local pt = prt:clone()
  298. pt.Parent = script.Parent.Parent
  299. pt.CFrame = CFrame.new(hammer.CFrame.x, Pos.y + 0.75, hammer.CFrame.z) + script.Parent.Parent:findFirstChild("Torso").CFrame.lookVector * 1.75
  300. GetFigures(pt.Parent.Parent, pt)
  301. game.Debris:addItem(pt, 1.3)
  302. end
  303. end
  304. p:Remove()
  305. end
  306. end
  307. end)
  308. wait(0.75)
  309. Whacker:Stop()
  310. whacking = false
  311. ------
  312. if selected == true then
  313. TwoHandAnim:Play()
  314. end
  315. end
  316. end
  317. local a = false
  318. local co = nil
  319. --OMGHAX mouseclick
  320. local last_click = 0
  321. script.Parent.MouseClick.Changed:connect(function()
  322. if homerunning == false and whacking == false then
  323. if time() - last_click < 0.3 then
  324. anim = "homerun"
  325. last_click = time()
  326. HomeRun()
  327. else
  328. anim = "norm"
  329. last_click = time()
  330. Whack()
  331. end
  332. end
  333. end)
  334. end))
  335. Script13.Name = "qPerfectionWeld"
  336. Script13.Parent = Tool0
  337. table.insert(cors,sandbox(Script13,function()
  338. -- Created by Quenty (@Quenty, follow me on twitter).
  339. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  340. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  341.  
  342. --[[ INSTRUCTIONS
  343. - Place in the model
  344. - Make sure model is anchored
  345. - That's it. It will weld the model and all children.
  346.  
  347. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  348. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  349. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  350. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  351. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  352. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  353. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  354. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  355.  
  356. 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.
  357. ]]
  358.  
  359. --[[ DOCUMENTATION
  360. - 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.
  361. - Will work in PBS servers
  362. - Will work as long as it starts out with the part anchored
  363. - Stores the relative CFrame as a CFrame value
  364. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  365. - Utilizes a recursive algorith to find all parts in the model
  366. - Will reweld on script reparent if the script is initially parented to a tool.
  367. - Welds as fast as possible
  368. ]]
  369.  
  370. -- qPerfectionWeld.lua
  371. -- Created 10/6/2014
  372. -- Author: Quenty
  373. -- Version 1.0.3
  374.  
  375. -- Updated 10/14/2014 - Updated to 1.0.1
  376. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  377.  
  378. -- Updated 10/14/2014 - Updated to 1.0.2
  379. --- Fixed bug fix.
  380.  
  381. -- Updated 10/14/2014 - Updated to 1.0.3
  382. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  383.  
  384. 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).
  385.  
  386.  
  387. local function CallOnChildren(Instance, FunctionToCall)
  388. -- Calls a function on each of the children of a certain object, using recursion.
  389.  
  390. FunctionToCall(Instance)
  391.  
  392. for _, Child in next, Instance:GetChildren() do
  393. CallOnChildren(Child, FunctionToCall)
  394. end
  395. end
  396.  
  397. local function GetNearestParent(Instance, ClassName)
  398. -- Returns the nearest parent of a certain class, or returns nil
  399.  
  400. local Ancestor = Instance
  401. repeat
  402. Ancestor = Ancestor.Parent
  403. if Ancestor == nil then
  404. return nil
  405. end
  406. until Ancestor:IsA(ClassName)
  407.  
  408. return Ancestor
  409. end
  410.  
  411. local function GetBricks(StartInstance)
  412. local List = {}
  413.  
  414. -- if StartInstance:IsA("BasePart") then
  415. -- List[#List+1] = StartInstance
  416. -- end
  417.  
  418. CallOnChildren(StartInstance, function(Item)
  419. if Item:IsA("BasePart") then
  420. List[#List+1] = Item;
  421. end
  422. end)
  423.  
  424. return List
  425. end
  426.  
  427. local function Modify(Instance, Values)
  428. -- Modifies an Instance by using a table.
  429.  
  430. assert(type(Values) == "table", "Values is not a table");
  431.  
  432. for Index, Value in next, Values do
  433. if type(Index) == "number" then
  434. Value.Parent = Instance
  435. else
  436. Instance[Index] = Value
  437. end
  438. end
  439. return Instance
  440. end
  441.  
  442. local function Make(ClassType, Properties)
  443. -- Using a syntax hack to create a nice way to Make new items.
  444.  
  445. return Modify(Instance.new(ClassType), Properties)
  446. end
  447.  
  448. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  449. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  450.  
  451. local function HasWheelJoint(Part)
  452. for _, SurfaceName in pairs(Surfaces) do
  453. for _, HingSurfaceName in pairs(HingSurfaces) do
  454. if Part[SurfaceName].Name == HingSurfaceName then
  455. return true
  456. end
  457. end
  458. end
  459.  
  460. return false
  461. end
  462.  
  463. local function ShouldBreakJoints(Part)
  464. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  465. -- definitely some edge cases.
  466.  
  467. if NEVER_BREAK_JOINTS then
  468. return false
  469. end
  470.  
  471. if HasWheelJoint(Part) then
  472. return false
  473. end
  474.  
  475. local Connected = Part:GetConnectedParts()
  476.  
  477. if #Connected == 1 then
  478. return false
  479. end
  480.  
  481. for _, Item in pairs(Connected) do
  482. if HasWheelJoint(Item) then
  483. return false
  484. elseif not Item:IsDescendantOf(script.Parent) then
  485. return false
  486. end
  487. end
  488.  
  489. return true
  490. end
  491.  
  492. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  493. --- Weld's 2 parts together
  494. -- @param Part0 The first part
  495. -- @param Part1 The second part (Dependent part most of the time).
  496. -- @param [JointType] The type of joint. Defaults to weld.
  497. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  498. -- @return The weld created.
  499.  
  500. JointType = JointType or "Weld"
  501. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  502.  
  503. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  504. Modify(NewWeld, {
  505. Name = "qCFrameWeldThingy";
  506. Part0 = Part0;
  507. Part1 = Part1;
  508. C0 = CFrame.new();--Part0.CFrame:inverse();
  509. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  510. Parent = Part1;
  511. })
  512.  
  513. if not RelativeValue then
  514. RelativeValue = Make("CFrameValue", {
  515. Parent = Part1;
  516. Name = "qRelativeCFrameWeldValue";
  517. Archivable = true;
  518. Value = NewWeld.C1;
  519. })
  520. end
  521.  
  522. return NewWeld
  523. end
  524.  
  525. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  526. -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  527. -- @param MainPart The part to weld the model to (can be in the model).
  528. -- @param [JointType] The type of joint. Defaults to weld.
  529. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  530.  
  531. for _, Part in pairs(Parts) do
  532. if ShouldBreakJoints(Part) then
  533. Part:BreakJoints()
  534. end
  535. end
  536.  
  537. for _, Part in pairs(Parts) do
  538. if Part ~= MainPart then
  539. WeldTogether(MainPart, Part, JointType, MainPart)
  540. end
  541. end
  542.  
  543. if not DoNotUnanchor then
  544. for _, Part in pairs(Parts) do
  545. Part.Anchored = false
  546. end
  547. MainPart.Anchored = false
  548. end
  549. end
  550.  
  551. local function PerfectionWeld()
  552. local Tool = GetNearestParent(script, "Tool")
  553.  
  554. local Parts = GetBricks(script.Parent)
  555. 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]
  556.  
  557. if PrimaryPart then
  558. WeldParts(Parts, PrimaryPart, "Weld", false)
  559. else
  560. warn("qWeld - Unable to weld part")
  561. end
  562.  
  563. return Tool
  564. end
  565.  
  566. local Tool = PerfectionWeld()
  567.  
  568.  
  569. if Tool and script.ClassName == "Script" then
  570. --- Don't bother with local scripts
  571.  
  572. script.Parent.AncestryChanged:connect(function()
  573. PerfectionWeld()
  574. end)
  575. end
  576.  
  577. -- Created by Quenty (@Quenty, follow me on twitter).
  578.  
  579. end))
  580. Animation14.Name = "HomeRun"
  581. Animation14.Parent = Tool0
  582. Animation14.AnimationId = "rbxassetid://54673790"
  583. Part15.Name = "ban part"
  584. Part15.Parent = Tool0
  585. Part15.BrickColor = BrickColor.new("Dark stone grey")
  586. Part15.Transparency = 1
  587. Part15.Rotation = Vector3.new(87.8199997, -47.3499985, 90.0099945)
  588. Part15.CanCollide = false
  589. Part15.FormFactor = Enum.FormFactor.Plate
  590. Part15.Size = Vector3.new(0.329999834, 0.340000093, 2.76999855)
  591. Part15.CFrame = CFrame.new(14.0344563, 148.472382, 220.398148, -9.28728914e-05, -0.677499533, -0.735523343, 0.0380967073, 0.734986424, -0.677010179, 0.999273837, -0.0280841347, 0.0257421304)
  592. Part15.BottomSurface = Enum.SurfaceType.Smooth
  593. Part15.TopSurface = Enum.SurfaceType.Smooth
  594. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  595. Part15.Position = Vector3.new(14.0344563, 148.472382, 220.398148)
  596. Part15.Orientation = Vector3.new(42.6100006, -88, 2.97000003)
  597. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  598. Script16.Parent = Part15
  599. table.insert(cors,sandbox(Script16,function()
  600. function onTouched(part)
  601. if part.Parent ~= nil then
  602. local h = part.Parent:findFirstChild("Humanoid")
  603. if h~=nil then
  604. if touch~=1 then
  605. touch=1
  606. wait(0.1)
  607. local place=game.Players:findFirstChild(part.Parent.Name)
  608. if place~=nil then
  609. place:Kick()
  610. end
  611. touch=0
  612. end
  613.  
  614. end
  615. end
  616. end
  617.  
  618. script.Parent.Touched:connect(onTouched)
  619. end))
  620. for i,v in pairs(mas:GetChildren()) do
  621. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  622. pcall(function() v:MakeJoints() end)
  623. end
  624. mas:Destroy()
  625. for i,v in pairs(cors) do
  626. spawn(function()
  627. pcall(v)
  628. end)
  629. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement