Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Why publish this?
- -- Kick gun's a bitch
- -- thanks for coming to my ted talk
- local function Compare_Value_To_Table(val,tab)
- for _,v in pairs(tab)do
- if v==val then
- return v
- end
- end
- end
- local function Find_Sub_String_In_Whole_String(whole_string,sub_strings_table)
- for _,v in pairs(sub_strings_table)do
- if string.find(whole_string:lower()
- ,tostring(v):lower()
- )then
- return v
- end
- end
- end
- local function obj_check_one(ob)
- if ob~=nil then
- if typeof(ob)~='userdata'then
- if ob.Parent~=nil then
- return ob
- end
- end
- end
- end
- local function Get_Player_From_Character_Descendant(ob)
- local full_1 = ob:GetFullName()
- local sep1 = string.find(full_1:lower(),
- '%.'
- )
- if sep1 then
- local sep2 = string.find(full_1:lower(),
- '%.',
- sep1 + 1
- )
- if sep2 then
- local char_name = full_1:sub(sep1 + 1,sep2 - 1)
- if char_name then
- local player = game:service'Players':FindFirstChild(char_name)
- if player then
- return player
- end
- end
- end
- end
- end
- local function Check_Name_Property_From_Table(ob,table_of_classnames,table_to_check)
- for _,z in pairs(table_of_classnames)do
- if pcall(ob:IsA(z))then
- if Find_Sub_String_In_Whole_String(ob.Name,table_to_check)then
- local plr = Get_Player_From_Character_Descendant(ob)
- if plr then
- plr:LoadCharacter()
- return true
- else
- ob:Destroy()
- return true
- end
- end
- end
- end
- end
- local function check_Kickisher(ob) -- workspace:GetDescendants()
- local players = game:GetService'Players'
- local tab = {'god mode',143884682,'kick',156292343}
- if players.Name=='Players'then
- players.Name = 'Players_Replacement_Name'
- end
- if obj_check_one(ob)then
- if Check_Name_Property_From_Table(ob,
- {'Humanoid'}
- ,tab
- )then
- return
- elseif ob:IsA'Sound'then
- if Find_Sub_String_In_Whole_String(ob.SoundId,tab)then
- local plr = Get_Player_From_Character_Descendant(ob)
- if plr then
- plr:LoadCharacter()
- else
- ob:Destroy()
- end
- end
- elseif ob:IsA'TextLabel'then
- if Find_Sub_String_In_Whole_String(ob.Text,tab)then
- local plr = Get_Player_From_Character_Descendant(ob)
- if plr then
- plr:LoadCharacter()
- else
- ob:Destroy()
- end
- end
- elseif ob:IsA'SpecialMesh'then
- if Find_Sub_String_In_Whole_String(ob.MeshId,tab)then
- local plr = Get_Player_From_Character_Descendant(ob)
- if plr then
- plr:LoadCharacter()
- else
- ob:Destroy()
- end
- end
- end
- end
- end
- for _,v in pairs(workspace:GetDescendants())do
- check_Kickisher(v)
- end
- workspace.DescendantAdded:Connect(check_Kickisher)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement