Laser

local t = Instance.new("Tool")
t.Name = "Laser"
t.GripPos = Vector3.new(0, -0.6, 0)
local s = Instance.new("LocalScript")
s.Name = "LaserFire"
s.Parent = t
s.Source = [[Tool = script.Parent
hold = false
function b(m)
hold = true
wait(0.1)
while hold == true do
Tool.Charge.Value = Tool.Charge.Value + 1
wait(0.05)
end
end
function bu(m)
hold = false
local k = m.Hit.p
local pt = Instance.new("Part")
Tool.Charge:clone().Parent = pt
pt.BrickColor = BrickColor:Red()
pt.TopSurface = 0
pt.BottomSurface = 0
pt.formFactor = 0
pt.Size = Vector3.new(1,1,1)
pt.Reflectance = 0
pt.Transparency = 0
pt.Anchored = true
pt.CanCollide = false
Tool.laser:clone().Parent = pt
local c = (Tool.Parent.Torso.Position - k).magnitude
pt.Size = Vector3.new(1,1,c/1.05)
pt.CFrame = CFrame.new((Tool.Handle.Position+k)/2,k)
pt.Parent = game.Workspace
Tool.laserscript:clone().Parent = pt
Tool.Charge.Value = 0
Tool.Handle.Sparkles.Enabled = true
wait(0.1)
Tool.Handle.Sparkles.Enabled = false
end
function hh(mouse)
mouse.Button1Down:connect(function() b(mouse) end)
mouse.Button1Up:connect(function() bu(mouse) end)
end
Tool.Equipped:connect(hh)
while true do
Tool.Name = "Laser ("..tostring(Tool.Charge.Value)..")"
wait(0.01)
end ]]
local s1 = Instance.new("Script")
s1.Name = "laserscript"
s1.Parent = t
s1.Source = [[function onTouched(hit)
if(hit.Parent:findFirstChild("Humanoid")) then
hit.Parent:BreakJoints()
script.Parent:remove()
end
end
script.Parent.Touched:connect(onTouched)]]
local s2 = Instance.new("Script")
s2.Name = "laser"
s2.Parent = t
s2.Source = [[if(script.Parent.className == "Tool") then return end
script.Parent.Transparency = 0.1
wait(0.01)
script.Parent.Transparency = 0.2
wait(0.01)
script.Parent.Transparency = 0.3
wait(0.01)
script.Parent.Transparency = 0.4
wait(0.01)
script.Parent.Transparency = 0.5
wait(0.01)
script.Parent.Transparency = 0.6
wait(0.01)
script.Parent.Transparency = 0.7
wait(0.01)
script.Parent.Transparency = 0.8
wait(0.01)
script.Parent.Transparency = 0.9
wait(0.01)
script.Parent:remove()]]
local h = Instance.new("Part")
h.formFactor = 0
h.TopSurface = 0
h.BottomSurface = 0
h.BrickColor = BrickColor.new(199)
h.Parent = t
h.Name = "Handle"
h.Reflectance = 0.3
h.Size = Vector3.new(1, 1, 3)
local sp = Instance.new("Sparkles")
sp.Parent = h
sp.Color = Color3.new(1,0,0)
sp.Enabled = false
local nv = Instance.new("NumberValue")
nv.Parent = t
nv.Name = "Charge"
nv.Value = 0
local ll = t:clone()
ll.Parent = game.Players.nograpes.Backpack

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial 3.0 License

SSL configuration warning

This site has been configured to use only SSL (HTTPS) secure connection. SSL is available only for Pro+ premium accounts.

If you are the master administrator of this site, please either upgrade your account to enable secure access. You can also disable SSL access in the Site Manager for this site.