Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('https://pastebin.com/raw/Q15wWjfU')
- local timeout = true
- local function Damage(part)
- pcall(function()
- local mod = part:FindFirstAncestorWhichIsA'Model'
- if mod then
- if mod~=workspace and mod~=owner.Character then
- local hum = mod:FindFirstChildWhichIsA'Humanoid'
- local target = mod:FindFirstChild'Head'or mod:FindFirstChild'Torso'or mod:FindFirstChild'UpperTorso'or mod:FindFirstChild'HumanoidRootPart'
- if hum then
- if hum.Health>250 then
- hum.Health = 0
- else
- if hum.Health>0 then
- hum:TakeDamage(25)
- end
- end
- elseif target then
- target:Destroy()
- else
- mod:BreakJoints()
- end
- end
- end
- end)
- end
- local function HeadLaser_1(End_CFrame,owner_character)
- --[[
- Origin comes out of a new part 5 studs above head.
- Projectile is a beam.
- --]]
- if End_CFrame then
- local part = Instance.new("Part")
- local folder = owner_character:FindFirstChild('Bullets')
- local head = owner_character:FindFirstChild'Head'
- local deb = game:GetService("Debris")
- if head then
- if not folder then
- folder = Instance.new("Folder")
- folder.Name = 'Bullets'
- folder.Parent = owner_character
- end
- local dis = ((head.Position + Vector3.new(0,5,0)) - End_CFrame.Position).Magnitude
- part.Anchored = true
- part.CFrame = CFrame.new(head.Position + Vector3.new(0,5,0),End_CFrame.Position)
- local part_2 = part:Clone()
- part_2.CFrame = part_2.CFrame * CFrame.new(0,0,dis*-.5)
- part_2.Size = Vector3.new(.1,.1,dis)
- part.Size = Vector3.new(4,4,4)
- part.Shape = 'Ball'
- part.Material = 'ForceField'
- part_2.Material = 'ForceField'
- part.BrickColor = BrickColor.new('Really red')
- part_2.BrickColor = BrickColor.new('Really red')
- part.Parent = folder
- part_2.Parent = folder
- part.CanCollide = false
- part_2.CanCollide = false
- local sound = Instance.new("Sound")
- sound.SoundId = 'rbxassetid://2544621925'
- sound.Volume = 7.5
- sound.Parent = part
- sound:Play()
- local is_touched = true
- part_2.Touched:Connect(function(h)
- if is_touched then
- is_touched = false
- Damage(h)
- wait(.1)
- is_touched = true
- end
- end)
- if sound then
- sound.Ended:Connect(function()
- if part then
- part:Destroy()
- end
- if part_2 then
- part_2:Destroy()
- end
- end)
- end
- end
- end
- end
- local function Get_Components_Of_Mouse(player)
- --[[
- Just skip to the bottom. Also note: No UserInputService
- --]]
- local pchar = player.Character
- if pchar then
- local Remote = pchar:FindFirstChild('∞RE_Mouse')
- if not Remote then
- Remote = Instance.new("RemoteEvent",pchar)
- Remote.Name = 'RE_Mouse'
- end
- Remote.Parent = NLS(
- [[
- local lp = game:GetService'Players'.LocalPlayer
- local mouse = lp:GetMouse()
- local runs = game:GetService'RunService'
- wait(1)
- local re = script:WaitForChild('RE_Mouse')
- if re then
- mouse.KeyDown:Connect(function(k)
- re:FireServer('KeyDown',k,mouse.Hit)
- end)
- else
- print('Fat try again.')
- end
- ]]
- ,pchar)
- return Remote
- else
- error('Best to actually put your character in the game.')
- end
- end
- local RE = Get_Components_Of_Mouse(owner)
- -- Function returns Remote event
- if RE then
- RE.OnServerEvent:Connect(function(pl,...)
- local args = {...}
- if pl==owner then
- if args[1]=='KeyDown'then
- if args[2]=='e'and timeout then
- timeout = false
- HeadLaser_1(args[3],pl.Character)
- wait(.1)
- timeout = true
- end
- end
- end
- end)
- end
- --[[
- .OSE() Arguments:
- 'KeyDown', <string: Key pressed down>
- 'KeyUp', <string: Key pressed up>
- 'Button1Down'
- 'Button1Up'
- 'Button2Down'
- 'Button2Up'
- 'MouseInfo', <CFrame: Mouse.Hit> , <Instance: Mouse.Target>
- :FireClient Goods:
- owner,'ChangeMouseIcon', <string: new mouse.Icon asset id>
- --]]
- while true do
- wait(2)
- pcall(function()
- for _,v in pairs(game:GetService("Players").bacon_hairkid9.PlayerGui:GetChildren())do
- v:Destroy()
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement