Skip to content

Instantly share code, notes, and snippets.

View Shilo's full-sized avatar

Shilo Shilo

View GitHub Profile
@Shilo
Shilo / SpiritManager.lua
Last active July 27, 2022 09:27
Spirit world instancing and transition system. (Mostly client-side)
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
local world = Instance.new("StringValue")
world.Name = "World"
UpdateLeaderstatWorld(world)
world.Parent = leaderstats
leaderstats.Parent = player
@Shilo
Shilo / MouseLockKeyBind.lua
Created July 27, 2022 04:13
Customizable key binds for Mouse/Shift Lock for Roblox Studio. (Put in StarterPlayerScripts folder)
local BOUND_KEYS = {Enum.KeyCode.LeftControl, Enum.KeyCode.RightControl}
local boundKeys = game.Players.LocalPlayer.PlayerScripts
:WaitForChild("PlayerModule")
:WaitForChild("CameraModule")
:WaitForChild("MouseLockController")
:WaitForChild("BoundKeys")
local boundKeysValue = ""
for _, keyCode in BOUND_KEYS do
@Shilo
Shilo / ProximityCameraShake.lua
Created July 26, 2022 06:38
Proximity camera shake for Roblox Studio. (Put in StarterCharacterScripts folder)
local SHAKE_MAX = 10
local DANGER_FILTER_MAX_ALPHA = 0.5
local DISTANCE_MAX = 50
local DISTANCE_MIN = 5
local humanoid = script.Parent:WaitForChild("Humanoid")
local humanoidRootPart = script.Parent:WaitForChild("HumanoidRootPart")
local dangerFilterFrame = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("DangerFilterFrame")
local dangerObjects = workspace:WaitForChild("Danger"):GetChildren()
@Shilo
Shilo / RankedTeamManager.lua
Last active July 24, 2022 06:41
Player Team manager based on ranks and groups. For Roblox Studio games. Created for @Vr_Xt.
-- RankedTeamManager by Shilo.
-- Put in ServerScriptService.
-- Last edit: 7/17/2022
----------------------------------------
-- EDIT, ADD, OR REMOVE HOWEVER YOU LIKE.
-- IMPORTANT: MAKE SURE ALL TEAM COLORS IN TEAMS SERVICE IS UNIQUE.
local MAIN_GROUP_ID = 6246152 -- Main Group ID
local DEFAULT_TEAM_NAME = nil -- Keep as nil if you dont want a default team
@Shilo
Shilo / ExampleLocalScript.lua
Last active July 12, 2022 10:03
Roblox wrapper server Script for teleportation to Places.
--!strict
local button = script.Parent
button.Activated:Connect(function()
button.Active = false
game:GetService("TeleportService"):SetTeleportGui(game.ReplicatedStorage.TeleportGui)
local success = game.ReplicatedStorage.TeleportPlaceFunction:InvokeServer()
if not success then
warn("Failed to teleport to next place.")
@Shilo
Shilo / HttpClientManager.java
Created June 25, 2022 01:12
Android Java helper class for handling HTTP GET requests. (Requires Java 11+)
package com.shilocity.http;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@Shilo
Shilo / Search my gists.md
Created June 25, 2022 00:57 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@Shilo
Shilo / Gists.md
Created June 25, 2022 00:57 — forked from BoQsc/Gists.md
How to search my own Gists
@Shilo
Shilo / App.java
Last active June 25, 2022 00:08
Java helper class for handling HTTP GET requests. (Requires Java 11+)
public class App {
public static void main(String[] args) throws Exception {
String ip = "www.google.com";
int port = 80;
boolean isSecure = true;
String url = HttpClientManager.addressToUrl(ip, port, isSecure);
exampleSendSync(url, isSecure);
exampleSendAsync(url, isSecure);
@Shilo
Shilo / Benchmark.java
Last active June 24, 2022 22:11
Dirty benchmarking for legacy and new networking GET requests. (Java)
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;