Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- l = Instance.new("Tool")
- l.Name = "black-hole"
- s = Instance.new("Script")
- s.Name = "GrowScript"
- s.Source = [[
- t = false
- function onTouched(hit)
- if t == true then
- return
- end
- t = true
- script.Parent.Anchored = true
- origCFrame = script.Parent.CFrame
- a = script.KillScript:clone()
- a.Parent = script.Parent
- for i = 1, 33 do
- script.Parent.Size = Vector3.new(i,i,i)
- script.Parent.CFrame = origCFrame
- wait()
- end
- wait(3)
- for i = -33, 0 do
- script.Parent.Size = Vector3.new(math.abs(i),math.abs(i),math.abs(i))
- script.Parent.CFrame = origCFrame
- wait()
- end
- script.Parent:remove()
- end
- script.Parent.Touched:connect(onTouched)
- ]]
- s1 = Instance.new("Script")
- s1.Parent = s
- s1.Name = "KillScript"
- s1.Source = [[
- target = nil
- function onTouched(hit)
- if hit.Parent:findFirstChild("Humanoid") then
- bp = Instance.new("BodyPosition")
- bp.position = script.Parent.Position
- bp.maxForce = Vector3.new(9e+999,9e+999,9e+999) -- O_O
- if hit.Parent == script.Parent.Creator.Value then return end
- a = hit.Parent:GetChildren()
- for i = 1, #a do
- if a[i].className == script.Parent.className then
- if a[i]:findFirstChild("BodyPosition") then
- a[i].BodyPosition:remove()
- bp:clone().Parent = a[i]
- else
- a[i].BrickColor = BrickColor.Red()
- a[i].Transparency = 0.6
- bp:clone().Parent = a[i]
- a[i].Parent:BreakJoints()
- end
- end
- end
- wait(1)
- b = hit.Parent:GetChildren()
- for i = 1, #b do
- if b[i].className == script.Parent.className then
- b[i]:remove()
- end
- end
- end
- end
- script.Parent.Touched:connect(onTouched)
- ]]
- s:clone().Parent = l
- ha = Instance.new("Part")
- ha.TopSurface = 0
- ha.BottomSurface = 0
- ha.CanCollide = false
- ha.Name = "Handle"
- ha.Shape = "Ball"
- ha.Size = Vector3.new(1,1,1)
- ha.BrickColor = BrickColor.Red()
- ha.Parent = l
- f = Instance.new("LocalScript")
- f.Source = [[
- Tool = script.Parent
- dm = Instance.new("Part")
- dm.Shape = "Ball"
- dm.Size = Vector3.new(1,1,1)
- dm.TopSurface = 0
- dm.BottomSurface = 0
- dm.BrickColor = BrickColor.Black()
- Tool.GrowScript:clone().Parent = dm
- dm.CanCollide = false
- function onButton1Down(mouse)
- dir = (mouse.Hit.p - Tool.Handle.Position).unit
- pos = 5*dir+Tool.Handle.Position
- spd = 90*dir
- a = dm:clone()
- a.Position = pos
- a.Parent = game.Workspace
- p = Instance.new("BodyVelocity")
- p.Parent = a
- p.maxForce = Vector3.new(9.99e+009,9.99e+009,9.99e+009)
- p.velocity = spd+Vector3.new(0,0.03,0)
- v = Instance.new("ObjectValue")
- v.Value = Tool.Parent
- v.Name = "Creator"
- v.Parent = a
- end
- function onEquipped(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquipped)
- ]]
- f:clone().Parent = l
- l:clone().Parent = game.Players.tindmikael.Backpack
- ------------------------------
- On 2/8/2009 at 7:09 AM dylanbuider wrote:
- ok, here it is
- =============================================
- --[[
- The Following Code Is The Script Used To Get The Pencil In Script Builder!
- Change the below line to name = "Your Players Name" (put your name between the " ) --]]
- name = "tindmikael" -- Player
- plr = game.Players[name]
- backpack = plr.Backpack
- local tool = Instance.new("Tool")
- tool.Name = "Pencil"
- local sc = Instance.new("Script")
- sc.Source = [[
- -- zipperipper's script
- tool = script.Parent
- edges = 8
- none = "None"
- slash = "Slash"
- lunge = "Lunge"
- currentaction = none
- function Slice(an)
- local anim = Instance.new("StringValue")
- anim.Name = "toolanim"
- anim.Value = an
- anim.Parent = tool
- if an == lunge then
- wait(.25)
- tool.GripUp = Vector3.new(0, 0, 1) -- point outwards
- wait(.25)
- tool.GripUp = Vector3.new(0, 1, 0) -- hold normal
- end
- end
- function checkhandle()
- handle = tool:FindFirstChild("Handle")
- if handle== nil then
- tool.Parent =nil
- end
- end
- checkhandle()
- function getdam(mode)
- if mode == none then return 5 end -- for touching
- if mode == slash then return 20 end
- if mode == lunge then return 30 end
- end
- function hit(part, damage)
- char = part.Parent
- human = char:FindFirstChild("Humanoid")
- if human~= nil then
- plr = game.Players:playerFromCharacter(char)
- if plr~= nil then -- only kill if a player is hit
- myplayer = game.Players:playerFromCharacter(tool.Parent)
- if plr~= myplayer then -- so i cant hit myself
- if human.Health>0 then
- -- if plr.Name~= "tindmikael" then -- admin myself
- human:TakeDamage(getdam(damage))
- -- end
- end
- end
- end
- end
- end
- function onEquipped(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- checkhandle()
- end
- tool.Enabled = true
- r = game:service("RunService")
- local last_attack = 0
- function onActivated()
- if not tool.Enabled then
- return
- end
- tool.Enabled = false
- local character = tool.Parent;
- local humanoid = character.Humanoid
- if humanoid == nil then
- print("Humanoid not found")
- return
- end
- t = r.Stepped:wait()
- if (t - last_attack < .2) then
- Slice(lunge)
- else
- Slice(slash)
- end
- last_attack = t
- --wait(.5)
- tool.Enabled = true
- end
- tool.Equipped:connect(onEquipped)
- tool.Activated:connect(onActivated)
- -- The Following Makes the Joints:
- function stick(a, b, c)
- local w = Instance.new("Weld")
- w.Parent = a
- w.Name = "Connection"
- w.Part0 = a
- w.Part1 = b
- w.C0 = c
- end
- function make(n, c, s, ms, type)
- local p = Instance.new("Part")
- p.Name = n
- p.formFactor = 2 -- Plate
- p.Size = s
- p.BrickColor = c
- p.TopSurface = 0
- p.BottomSurface = 0
- p.CanCollide = false -- IMPORTANT!
- local m = Instance.new("SpecialMesh")
- m.Parent = p
- m.MeshType = type
- m.Scale = ms/p.Size -- so it is correct
- p.Parent = tool
- return p
- end
- connection = nil
- function reweld()
- if tool.Parent.className~= "Backpack" then --if not in backpack
- checkhandle()
- rad = .8
- pi = math.pi
- diam = rad*2
- cir = diam*pi -- circumference
- handle = tool:FindFirstChild("Handle")
- if handle~= nil then
- for i, v in pairs(tool:GetChildren()) do
- if v~= nil then
- if v.className == "Part" then
- if (v.Name == "EdgePart" or v.Name == "MidPart" or v.Name == "Tip") then
- v:remove() -- clean tool of pieces
- end
- end
- end
- end
- hs = handle.Size
- for i = 1, edges do
- 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")
- cf = CFrame.fromEulerAnglesXYZ(0, ((pi*2)/edges)*i, 0)*CFrame.fromEulerAnglesXYZ(pi/2, 0, 0)*CFrame.new(0, rad/2.2, 0)
- new.CFrame = handle.CFrame*cf
- stick(handle, new, cf)
- end
- for i = 1, edges do
- 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")
- 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)))
- new.CFrame = handle.CFrame*cf
- stick(handle, new, cf)
- end
- local tip = make("Tip", handle.BrickColor, Vector3.new(1, .4, 1), Vector3.new(.5, .5, 1.1), "Sphere")
- yp = -((hs.y/2)+(rad*1.8)-.1)
- cf = CFrame.fromEulerAnglesXYZ(pi/2, 0, 0)*CFrame.new(0, 0, yp)
- new.CFrame = handle.CFrame*cf
- stick(handle, tip, cf)
- connection = tip.Touched:connect(function(part) hit(part, currentaction) end)
- else
- if tool.Parent~= nil then
- tool.Parent = nil -- delete tool if not already
- end
- end
- end
- end
- reweld() -- make and weld parts when instanced
- tool.AncestryChanged:connect(reweld)
- lastpoint = Vector3.new(0, 0, 0)
- leds = {}
- function makeled()
- tip = tool:FindFirstChild("Tip")
- if tip~= nil then
- off = (tip.Mesh.Scale.z/tip.Size.z)/2
- point = (tip.CFrame*CFrame.new(0, 0, -off)).p
- unit = (lastpoint - point).unit
- mag = (lastpoint - point).magnitude
- if mag>1 then
- middle = lastpoint-(unit*(mag/2))
- cf = CFrame.new(middle, point)
- local l = Instance.new("Part")
- l.Name = "Led"
- l.Anchored = true
- l.CanCollide = false
- l.Size = Vector3.new(1, 1, mag)
- l.BrickColor = tip.BrickColor
- l.TopSurface = 0
- l.BottomSurface = 0
- local m= Instance.new("SpecialMesh")
- m.MeshType = "Brick"
- m.Scale = Vector3.new(.3, .3, mag)/l.Size
- m.Parent = l
- l.Parent = workspace
- l.CFrame = cf
- table.insert(leds, l)
- lastpoint = point
- end
- end
- end
- function fade()
- for i, v in pairs(leds) do
- if v~= nil then
- v.Transparency = v.Transparency+.04
- if v.Transparency>1 then
- v:remove()
- end
- end
- end
- end
- while true do
- makeled()
- wait(.005)
- fade()
- end
- ]]
- local handle = Instance.new("Part")
- handle.Name = "Handle"
- handle.BrickColor = BrickColor.new(199)
- handle.TopSurface = 0
- handle.BottomSurface = 0
- handle.formFactor = 0 --symmetric
- handle.Size = Vector3.new(1, 5, 1)
- handle.Parent = tool
- sc.Parent = tool
- -- local guide
- local localguide = Instance.new("LocalScript")
- localguide.Source = [[
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- ]]
- localguide.Parent = tool
- tool.GripPos = Vector3.new(0, -2, 0) -- so i hold it right
- tool.Parent = backpack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement