Advertisement
memberhero

Untitled

May 12th, 2016
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.28 KB | None | 0 0
  1.  
  2.  
  3. l = Instance.new("Tool")
  4. l.Name = "black-hole"
  5. s = Instance.new("Script")
  6. s.Name = "GrowScript"
  7. s.Source = [[
  8. t = false
  9. function onTouched(hit)
  10. if t == true then
  11. return
  12. end
  13. t = true
  14. script.Parent.Anchored = true
  15. origCFrame = script.Parent.CFrame
  16. a = script.KillScript:clone()
  17. a.Parent = script.Parent
  18. for i = 1, 33 do
  19. script.Parent.Size = Vector3.new(i,i,i)
  20. script.Parent.CFrame = origCFrame
  21. wait()
  22. end
  23. wait(3)
  24. for i = -33, 0 do
  25. script.Parent.Size = Vector3.new(math.abs(i),math.abs(i),math.abs(i))
  26. script.Parent.CFrame = origCFrame
  27. wait()
  28. end
  29. script.Parent:remove()
  30. end
  31. script.Parent.Touched:connect(onTouched)
  32. ]]
  33. s1 = Instance.new("Script")
  34. s1.Parent = s
  35. s1.Name = "KillScript"
  36. s1.Source = [[
  37. target = nil
  38. function onTouched(hit)
  39. if hit.Parent:findFirstChild("Humanoid") then
  40. bp = Instance.new("BodyPosition")
  41. bp.position = script.Parent.Position
  42. bp.maxForce = Vector3.new(9e+999,9e+999,9e+999) -- O_O
  43. if hit.Parent == script.Parent.Creator.Value then return end
  44. a = hit.Parent:GetChildren()
  45. for i = 1, #a do
  46. if a[i].className == script.Parent.className then
  47. if a[i]:findFirstChild("BodyPosition") then
  48. a[i].BodyPosition:remove()
  49. bp:clone().Parent = a[i]
  50. else
  51. a[i].BrickColor = BrickColor.Red()
  52. a[i].Transparency = 0.6
  53. bp:clone().Parent = a[i]
  54. a[i].Parent:BreakJoints()
  55. end
  56. end
  57. end
  58. wait(1)
  59. b = hit.Parent:GetChildren()
  60. for i = 1, #b do
  61. if b[i].className == script.Parent.className then
  62. b[i]:remove()
  63. end
  64. end
  65. end
  66. end
  67. script.Parent.Touched:connect(onTouched)
  68. ]]
  69. s:clone().Parent = l
  70. ha = Instance.new("Part")
  71. ha.TopSurface = 0
  72. ha.BottomSurface = 0
  73. ha.CanCollide = false
  74. ha.Name = "Handle"
  75. ha.Shape = "Ball"
  76. ha.Size = Vector3.new(1,1,1)
  77. ha.BrickColor = BrickColor.Red()
  78. ha.Parent = l
  79. f = Instance.new("LocalScript")
  80. f.Source = [[
  81. Tool = script.Parent
  82. dm = Instance.new("Part")
  83. dm.Shape = "Ball"
  84. dm.Size = Vector3.new(1,1,1)
  85. dm.TopSurface = 0
  86. dm.BottomSurface = 0
  87. dm.BrickColor = BrickColor.Black()
  88. Tool.GrowScript:clone().Parent = dm
  89. dm.CanCollide = false
  90. function onButton1Down(mouse)
  91. dir = (mouse.Hit.p - Tool.Handle.Position).unit
  92. pos = 5*dir+Tool.Handle.Position
  93. spd = 90*dir
  94. a = dm:clone()
  95. a.Position = pos
  96. a.Parent = game.Workspace
  97. p = Instance.new("BodyVelocity")
  98. p.Parent = a
  99. p.maxForce = Vector3.new(9.99e+009,9.99e+009,9.99e+009)
  100. p.velocity = spd+Vector3.new(0,0.03,0)
  101. v = Instance.new("ObjectValue")
  102. v.Value = Tool.Parent
  103. v.Name = "Creator"
  104. v.Parent = a
  105. end
  106. function onEquipped(mouse)
  107. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  108. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  109. end
  110. Tool.Equipped:connect(onEquipped)
  111. ]]
  112. f:clone().Parent = l
  113. l:clone().Parent = game.Players.tindmikael.Backpack
  114. ------------------------------
  115. On 2/8/2009 at 7:09 AM dylanbuider wrote:
  116.  
  117. ok, here it is
  118. =============================================
  119. --[[
  120.  
  121.  
  122. The Following Code Is The Script Used To Get The Pencil In Script Builder!
  123. Change the below line to name = "Your Players Name" (put your name between the " ) --]]
  124. name = "tindmikael" -- Player
  125.  
  126. plr = game.Players[name]
  127. backpack = plr.Backpack
  128. local tool = Instance.new("Tool")
  129. tool.Name = "Pencil"
  130. local sc = Instance.new("Script")
  131. sc.Source = [[
  132. -- zipperipper's script
  133.  
  134. tool = script.Parent
  135.  
  136. edges = 8
  137.  
  138. none = "None"
  139. slash = "Slash"
  140. lunge = "Lunge"
  141. currentaction = none
  142. function Slice(an)
  143. local anim = Instance.new("StringValue")
  144. anim.Name = "toolanim"
  145. anim.Value = an
  146. anim.Parent = tool
  147. if an == lunge then
  148. wait(.25)
  149. tool.GripUp = Vector3.new(0, 0, 1) -- point outwards
  150. wait(.25)
  151. tool.GripUp = Vector3.new(0, 1, 0) -- hold normal
  152. end
  153. end
  154.  
  155. function checkhandle()
  156. handle = tool:FindFirstChild("Handle")
  157. if handle== nil then
  158. tool.Parent =nil
  159. end
  160. end
  161. checkhandle()
  162. function getdam(mode)
  163. if mode == none then return 5 end -- for touching
  164. if mode == slash then return 20 end
  165. if mode == lunge then return 30 end
  166. end
  167. function hit(part, damage)
  168. char = part.Parent
  169. human = char:FindFirstChild("Humanoid")
  170. if human~= nil then
  171. plr = game.Players:playerFromCharacter(char)
  172. if plr~= nil then -- only kill if a player is hit
  173. myplayer = game.Players:playerFromCharacter(tool.Parent)
  174. if plr~= myplayer then -- so i cant hit myself
  175. if human.Health>0 then
  176. -- if plr.Name~= "tindmikael" then -- admin myself
  177. human:TakeDamage(getdam(damage))
  178. -- end
  179. end
  180. end
  181. end
  182. end
  183. end
  184.  
  185. function onEquipped(mouse)
  186. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  187. checkhandle()
  188. end
  189.  
  190. tool.Enabled = true
  191. r = game:service("RunService")
  192. local last_attack = 0
  193. function onActivated()
  194.  
  195. if not tool.Enabled then
  196. return
  197. end
  198.  
  199. tool.Enabled = false
  200.  
  201. local character = tool.Parent;
  202. local humanoid = character.Humanoid
  203. if humanoid == nil then
  204. print("Humanoid not found")
  205. return
  206. end
  207.  
  208. t = r.Stepped:wait()
  209.  
  210. if (t - last_attack < .2) then
  211. Slice(lunge)
  212. else
  213. Slice(slash)
  214. end
  215.  
  216. last_attack = t
  217.  
  218. --wait(.5)
  219.  
  220. tool.Enabled = true
  221. end
  222.  
  223. tool.Equipped:connect(onEquipped)
  224. tool.Activated:connect(onActivated)
  225.  
  226.  
  227.  
  228.  
  229.  
  230. -- The Following Makes the Joints:
  231.  
  232.  
  233.  
  234. function stick(a, b, c)
  235. local w = Instance.new("Weld")
  236. w.Parent = a
  237. w.Name = "Connection"
  238. w.Part0 = a
  239. w.Part1 = b
  240. w.C0 = c
  241. end
  242.  
  243. function make(n, c, s, ms, type)
  244. local p = Instance.new("Part")
  245. p.Name = n
  246. p.formFactor = 2 -- Plate
  247. p.Size = s
  248. p.BrickColor = c
  249. p.TopSurface = 0
  250. p.BottomSurface = 0
  251. p.CanCollide = false -- IMPORTANT!
  252. local m = Instance.new("SpecialMesh")
  253. m.Parent = p
  254. m.MeshType = type
  255. m.Scale = ms/p.Size -- so it is correct
  256. p.Parent = tool
  257. return p
  258. end
  259.  
  260. connection = nil
  261. function reweld()
  262. if tool.Parent.className~= "Backpack" then --if not in backpack
  263. checkhandle()
  264. rad = .8
  265. pi = math.pi
  266. diam = rad*2
  267. cir = diam*pi -- circumference
  268. handle = tool:FindFirstChild("Handle")
  269. if handle~= nil then
  270. for i, v in pairs(tool:GetChildren()) do
  271. if v~= nil then
  272. if v.className == "Part" then
  273. if (v.Name == "EdgePart" or v.Name == "MidPart" or v.Name == "Tip") then
  274. v:remove() -- clean tool of pieces
  275. end
  276. end
  277. end
  278. end
  279. hs = handle.Size
  280. for i = 1, edges do
  281. new = make("EdgePart", BrickColor.Yellow(), Vector3.new(hs.z, hs.x, hs.y), Vector3.new((cir/edges)/1.2, rad/1.4, hs.y), "Brick")
  282. cf = CFrame.fromEulerAnglesXYZ(0, ((pi*2)/edges)*i, 0)*CFrame.fromEulerAnglesXYZ(pi/2, 0, 0)*CFrame.new(0, rad/2.2, 0)
  283. new.CFrame = handle.CFrame*cf
  284. stick(handle, new, cf)
  285. end
  286. for i = 1, edges do
  287. new = make("MidPart", BrickColor.new(5), Vector3.new(hs.z, hs.x, rad*1.8), Vector3.new((cir/edges)/1.4, rad/1.6, rad*1.8), "Wedge")
  288. cf = CFrame.fromEulerAnglesXYZ(0, ((pi*2)/edges)*i, 0)*CFrame.fromEulerAnglesXYZ(pi/2, 0, 0)*CFrame.new(0, rad/2, -((hs.y/2)+((rad*1.8)/2)))
  289. new.CFrame = handle.CFrame*cf
  290. stick(handle, new, cf)
  291. end
  292. local tip = make("Tip", handle.BrickColor, Vector3.new(1, .4, 1), Vector3.new(.5, .5, 1.1), "Sphere")
  293. yp = -((hs.y/2)+(rad*1.8)-.1)
  294. cf = CFrame.fromEulerAnglesXYZ(pi/2, 0, 0)*CFrame.new(0, 0, yp)
  295. new.CFrame = handle.CFrame*cf
  296. stick(handle, tip, cf)
  297. connection = tip.Touched:connect(function(part) hit(part, currentaction) end)
  298. else
  299. if tool.Parent~= nil then
  300. tool.Parent = nil -- delete tool if not already
  301. end
  302. end
  303. end
  304. end
  305. reweld() -- make and weld parts when instanced
  306.  
  307. tool.AncestryChanged:connect(reweld)
  308.  
  309.  
  310.  
  311.  
  312. lastpoint = Vector3.new(0, 0, 0)
  313. leds = {}
  314. function makeled()
  315. tip = tool:FindFirstChild("Tip")
  316. if tip~= nil then
  317. off = (tip.Mesh.Scale.z/tip.Size.z)/2
  318. point = (tip.CFrame*CFrame.new(0, 0, -off)).p
  319. unit = (lastpoint - point).unit
  320. mag = (lastpoint - point).magnitude
  321. if mag>1 then
  322. middle = lastpoint-(unit*(mag/2))
  323. cf = CFrame.new(middle, point)
  324. local l = Instance.new("Part")
  325. l.Name = "Led"
  326. l.Anchored = true
  327. l.CanCollide = false
  328. l.Size = Vector3.new(1, 1, mag)
  329. l.BrickColor = tip.BrickColor
  330. l.TopSurface = 0
  331. l.BottomSurface = 0
  332. local m= Instance.new("SpecialMesh")
  333. m.MeshType = "Brick"
  334. m.Scale = Vector3.new(.3, .3, mag)/l.Size
  335. m.Parent = l
  336. l.Parent = workspace
  337. l.CFrame = cf
  338. table.insert(leds, l)
  339. lastpoint = point
  340. end
  341. end
  342. end
  343. function fade()
  344. for i, v in pairs(leds) do
  345. if v~= nil then
  346. v.Transparency = v.Transparency+.04
  347. if v.Transparency>1 then
  348. v:remove()
  349. end
  350. end
  351. end
  352. end
  353.  
  354. while true do
  355. makeled()
  356. wait(.005)
  357. fade()
  358. end
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365. ]]
  366.  
  367.  
  368. local handle = Instance.new("Part")
  369. handle.Name = "Handle"
  370. handle.BrickColor = BrickColor.new(199)
  371. handle.TopSurface = 0
  372. handle.BottomSurface = 0
  373. handle.formFactor = 0 --symmetric
  374. handle.Size = Vector3.new(1, 5, 1)
  375. handle.Parent = tool
  376. sc.Parent = tool
  377.  
  378. -- local guide
  379. local localguide = Instance.new("LocalScript")
  380.  
  381. localguide.Source = [[
  382. local Tool = script.Parent;
  383.  
  384. enabled = true
  385. function onButton1Down(mouse)
  386. if not enabled then
  387. return
  388. end
  389. enabled = true
  390.  
  391. end
  392.  
  393. function onEquippedLocal(mouse)
  394.  
  395. if mouse == nil then
  396. print("Mouse not found")
  397. return
  398. end
  399.  
  400. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  401. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  402. end
  403.  
  404.  
  405. Tool.Equipped:connect(onEquippedLocal)
  406.  
  407. ]]
  408. localguide.Parent = tool
  409.  
  410. tool.GripPos = Vector3.new(0, -2, 0) -- so i hold it right
  411.  
  412. tool.Parent = backpack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement