Forum > Scripts >

CTRL + Click Explode

Posts: 1

Threads: 1

Joined: Mar, 2021

Reputation: 0

Posted

I'm looking for a script that will make the place I hover my mouse over and press CTRL explode.  Thanks

 

 

This script doesn't work;

local plr = game:GetService"Players".LocalPlayer
local m = plr"GetMouse"

local ctrldown = false
game:GetService"UserInputService".InputBegan:connect(function(iobj, gp)
   if iobj.KeyCode == Enum.KeyCode.LeftControl then
       ctrldown = true
   end
end)
game:GetService"UserInputService".InputEnded:connect(function(iobj, gp)
   if iobj.KeyCode == Enum.KeyCode.LeftControl then
       ctrldown = false
   end
end)

m.Button1Down:connect(function()
   if ctrldown and m.Target then
       Instance.new("Explosion", workspace).Position = m.Hit.p
   end
end)
  • 0

Posts: 9

Threads: 1

Joined: Feb, 2022

Reputation: 1

Replied

try this, but others can't see it so idk why you'd want it

local plr = game:GetService"Players".LocalPlayer
local m = plr:GetMouse()

local ctrldown = false
game:GetService"UserInputService".InputBegan:connect(function(iobj, gp)
   if iobj.KeyCode == Enum.KeyCode.LeftControl then
       ctrldown = true
   end
end)
game:GetService"UserInputService".InputEnded:connect(function(iobj, gp)
   if iobj.KeyCode == Enum.KeyCode.LeftControl then
       ctrldown = false
   end
end)

m.Button1Down:connect(function()
   if ctrldown and m.Target then
       Instance.new("Explosion", workspace).Position = m.Hit.p
   end
end)
  • 0

Syraxes_

Web Developer

vip

Posts: 1068

Threads: 30

Joined: Jul, 2021

Reputation: 63

Replied

Yeah. but you are the only one who can see it

  • 0

I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )